Kategorien: development, html / css, JavaScript, php, b2evolution
05.09.12
Deploying a website using Git via SSH remote
Git has a concept of "remotes" (tracked repositories), which allows to have
arbitrary alternate remote locations besides the typical "origin" remote, like "web".
The basic idea is to setup a user on the remote server ($SSH_DEPLOYUSER) which
is allowed to login via SSH (e.g. by adding your public SSH key to the deploy
user's ~/.ssh/authorized_keys file) and will be used to checkout what you want
to deploy.
To accomplish this you have to setup the Git working directory on the server and
add a "post-receive" hook, which will be invoked by Git after you have pushed
to the repository:
Code:
$ mkdir /path/to/repo-checkout | |
$ cd /path/to/repo-checkout | |
$ git init | |
# Create the post-receive file/hook (Ctrl-D to end the input to "cat"): | |
$ cat > .git/hooks/post-receive | |
#!/bin/sh | |
export GIT_DIR=$(pwd) | |
cd .. | |
git checkout -f | |
git submodule update --init --recursive | |
$ chmod +x .git/hooks/post-receive | |
$ git config --add receive.denyCurrentBranch ignore | |
$ chown $SSH_DEPLOYUSER -R . |
On the local side you have to add a "remote" (named "web" in this case):
The final step is to initially push to it (which requires to specify the "refspec" once - following deployments can be done by just doing a "git push web"):
Code:
$ git remote add web ssh://$DEPLOYUSER@host.example.com/path/to/repo-checkout/.git | |
$ git push web +master:refs/heads/master |
These instructions are based on the howto at toroid.org/ams/git-website-howto, but the main difference is that I am not using a "bare" repository here, which would not allow to use Git submodules; submodules require a "full" Git working directory and having a checkout of the repository requires the receive.denyCurrentBranch=ignore setting.
11.05.10
Flattr: you pay for the web
Micro wird ja gerne mit "u" abgekürzt: möchte man nun einen kurzen Twitter-Hash für "Micropayment" erstellen, und das ganze noch in den Zusammenhang des "man bezahlt" stellen, muss "#upay" dabei herauskommen.
Und genau darum geht es:
Einfach bezahlen, und dadurch geben. Bekommen kommt dann wenn man es verdient.
Man sieht etwas, das einem gefällt und hat die Möglichkeit einfach nur "I Like" zu klicken, und dadurch Geld (ein offizielles Tauschmittel) zu transferieren, spenden und zu verteilen.
In diesem Zusammenhang: Flattr wurde als Beta freigegeben: ein Micro-Payment-Dienst, wo das monatliches Budget (z.B. 2€ oder auch 50€) auf alle Upvotes/Klicks in diesem Zeitraum (Monat) verteilt wird: mag man 4 Sachen in der Zeit gibt es für jeden 50¢ oder 12,5€, mag man 50 Sachen bekommt jeder 4¢ oder 1€).
Kleinvieh macht am meisten Mist und die Intention hierbei ist es, ein einfaches Transferieren zu ermöglichen - allerdings natürlich durch ähnlich umfassende Integration, wie es der Facebook-"I like"-Button verlangt (durch Einbinden des JavaScripts auf den Seiten).
Wer bereits einen Flattr-Zugang hat, darf dies nun gerne in meinem Blog-Sidebar ausprobieren und praktizieren, indem er meinem "Thing" (Blog) einen Teil der monatlichen Tantiemen gibt - (auch diesem Eintrag habe ich nun manuell das Widget hinzugefügt).
Ich bin auch angefangen ein umfassenderes b2evolution-Plugin zu schreiben, allerdings mal wieder sehr von Kleinigkeiten im "evocore" frustriert und abgelenkt worden.
Derzeit ist der Dienst noch nicht frei zugänging, man kann sich aber zur Beta anmelden (was ich wohl vor einigen Wochen/Monaten irgendwann getan habe).
07.05.10
tqWorms reloaded
I've noticed some days ago that the DOS game I've written in 1999 can get played still using DOSBox.
The sound is apparently a bit crappy - but fortunately this is not on Linux only..
You can view the old software home at thequod.de/.../tqworms, but this is apparently very old already and I should get it some new home probably. Anyway, https://www.thequod.de/de/comp/mysoft/tqworms should be fine.
Screenshots are up on Flickr finally and it's known to cause maximum pleasure with 5+ users on the same keyboard only.
Would love to play this again - maybe even more when sound stutter (via DOSBox) is being fixed.

27.01.10
TortoiseSVN/VCS GUI integration in jEdit
I've created the following macros to easily launch various SVN commands in TortoiseSVN at work.
To use them yourself, just create the displayed files (VCS/*.bsh) in your personal "macros" directory (~/.jedit/macros).
Code:
for i in ~/.jedit/macros/VCS/*; do echo "$i:"; cat $i; done | |
| |
VCS/blame_current_file.bsh: | |
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:blame /path:\""+buffer.getPath()+"\" /line:"+(textArea.getCaretLine()+1); | |
Runtime.getRuntime().exec( exec ); | |
| |
VCS/commit_current_file.bsh: | |
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:commit /path:\""+buffer.getPath()+"\" /logmsg:\""+buffer.getName()+": \""; | |
Runtime.getRuntime().exec( exec ); | |
| |
VCS/diff_current_file.bsh: | |
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:diff /path:\""+buffer.getPath()+"\""; | |
Runtime.getRuntime().exec( exec ); | |
| |
VCS/log_current_file.bsh: | |
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:log /path:\""+buffer.getPath()+"\""; | |
Runtime.getRuntime().exec( exec ); |
You can now execute those macros either by calling them from the "Macros" menu, assign a shortcut to them or (my preferred way) via Ctrl-Enter, typing parts of them and then TAB-completing it (e.g. Ctrl-Enter, "log_", TAB, Enter).
They do not have "svn" in the name, since they might get extended to use the appropriate VCS GUI command in the future, for example by testing if there's a .svn control directory or using commands like "bzr st" or "git status" to check if it's a Bazaar/Git/... file.
(For debugging, you can use Macros.message( view, exec ); to display the "exec" value in a message)
28.04.09
OpenSource is distracting
Having the possibility to report bugs against tools and applications you are using to report bugs in other applications can lead to a whole stack of browser windows, things and stuff being open.
Especially if there are bugs in the application to report the oh-no-it's-starting-to-recurse bug report (Yes, I'm looking at you, Launchpad).
16.04.09
b2evolution/whissip auf Deutsch: wieder zu 100% übersetzt
Dank Tilman ist nun b2evolution (und damit auch whissip) komplett auf Deutsch übersetzt.
Ich bin damals bei b2evolution eingestiegen, indem ich die deutsche Übersetzung beigesteuert habe, aber habe das leider in letzter Zeit vernachlässigt.
Glücklicherweise ist Tilman nun eingesprungen und hat dies nun zu 100% übersetzt.
Eventuelle Bugs/Vorschläge können bei Launchpad hinterlassen werden.
11.03.09
Whissip.net
Link: http://whissip.codeprobe.de/
Registered my first .net domain today: whissip.net
This will host information about the b2evolution branch I'm maintaining.
Update: I've scheduled the domain for deletion now. The site's hosting has moved to whissip.codeprobe.de.
See also whissip's ohloh entry with information about code history etc.
