Just a note for myself. Or if anyone’s interested, feel free to continue reading.
This posts records the steps needed to allow the webserver to run a “git pull” command in your website’s folder.
Setting up SSH
In the case of Nginx, the home folder is /var/cache/nginx/
You need a .ssh folder here with the ownership given to “nginx”, which is the user account the webserver runs as.
Generate your PKI keys, update the public key at github and also make sure nginx owns those keys.
Website folder permissions
You will need to change the ownership of all the files in your web folder, including the .git folder and files to the “nginx” user account.
su nginx to “log in” as the nginx user. You may need to change the bash settings in /etc/passwd in order to allow this login.
go to your website folder and run “git pull”. You will be asked to add the public key for github.com into your list of known hosts, so just type in “yes”
I have a php file in /var/www/html that runs the git pull in the website folder when accessed.
The line of code is simply:
shell_exec(“cd /var/www/websitefolder.com/; git pull”);
Then add the url to this file in github’s hooks section and whenever you push to github, github will send a post to this file, triggering the git pull in that website folder.
One thing I find depressing about console gaming is that newer generation consoles are often not backwards compatible. Which means they can’t play games from previous generation consoles; a PlayStation 3 cannot read or play the games of PS2.
So when one day, my PS2 console finally gives up on me, I would have to hunt for a second-hand PS2 or my games will all be unplayable to me anymore.
Which… is kind of sad…
This problem has happened to me before and I forgot how I fixed it. Thus, this warrants a blog post to remind me how I fixed it!
The problem: Editor fonts look weird and the Preferences window refuses to open.
This may be because Java 1.7 is installed or in use. NetBeans on OSX does not work well with this version. You need to uninstall it by deleting the JavaVirtualMachine from the /Library/Java/JavaVirtualMachines folder.
Google for 1.6 to find the download on Apple’s website. Or if it’s already installed, run java -version in terminal to find out what version is active.
TL;DR: Buy things that suit your needs well and shut the hell up unless someone asks for your opinion.
I don’t mind when people bash Apple’s products if they have good reason.
But nowadays people are doing it simply because it’s cool to do so.
It hurts a little when you’re targeted because of the other fanatics who believe in the same brand as you do, and yet you’re not as extreme as them.
Now I know how some Christians feel when I used to show my dislike towards their religion. (This happened during the days when I was young and foolish!)
Because these situations are so similar.
I used to dislike Christianity because of some extreme believers pushing their beliefs onto me, but then I learned that not all Christians are like that.
Hey, I’m just a regular guy who’s eager to give up his money for products that work well, for content that entertains me well, for services that serve me well.
Louis CK said it best. Everything’s amazing, nobody’s happy.
Recently, I began playing CounterStrike:Source again for nostalgic reasons. It’s also the only FPS game I could play without feeling nauseus after 20 minutes.
I’m sad at how it’s difficult to find a decent server with low latency. I hope this changes when I get a fiber connection probably by the end of this year.
And when I find a low-latency server, it’s always set to a fixed map (de_dust2), or it has weird mods like instant-respawn.
When I finally found one with the traditional settings, it’s a high-latency server.
Anyway, I found one that’s frequented by Singapore players, low-latency (20~30ms) and default rules, even had friendly fire turned on. I love it here so far.
Everyone plays according to the rules. Counter-Terrorists actually play according to the aim of the map (defend bomb-sites, rescue hostages), instead of rushing to eliminate Terrorists. Terrorists actually try to secure the bomb-site to plant the bomb instead of camping at their base.
Probably because this is a very old game. All the young hooligans that don’t like to play by the rules of the map have all gone up and left for newer games like Dota or Diablo 3. Only the ones that truly enjoy the basics of the game remain.
The server’s name is so aptly named: Old Man Gang.