List current as of v4.3.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Open a command prompt and navigate to /etc/nginx/ssl | |
2. issue "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr" | |
3. Get your certificate - Go to your certificate authority and give them the CSR | |
4. copy your new crt to the /etc/nginx/ssl and give it read priveledges | |
5. reconfigure your nginx.conf, here is mine. The first part redirects 80 to 443, the second part listens to 443 and is optimized to return Ruby on Rails application requests using gzip and unicorn. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Open a new instance of KeePassX with the specified database | |
# | |
# release: 2014-08-18 | |
# src: https://gist.github.com/vrillusions/4b1156054019437d969c | |
set -e | |
set -u | |
I hereby claim:
- I am vrillusions on github.
- I am vrillusions (https://keybase.io/vrillusions) on keybase.
- I have a public key whose fingerprint is 4704 CA9C DC4B 315F AD2D 0FD4 B899 1FDD 7A82 5389
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Permanently move a subversion repos to git | |
# If you have tags and branch but never used them you can do this: | |
git svn clone -s --no-metadata --authors-file ~/git_resources/authors https://example.com/svn/repos | |
git remote add origin git@github.com:username/repo.git | |
git push -u origin master | |
# Don't forget to add a README.markdown file. | |
# | |
# optionally use git clone on the repository again, this will remove all the svn stuff from | |
# .git/config file. If you push to github all you need to do is do the initial push and then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# The "getting started" when creating a new project doesn't cover how to setup git so | |
# you can do operations like `git push` without having to specify the branch each time. | |
# This fixes that. | |
# | |
git config branch.master.remote origin | |
git config branch.master.merge 'refs/heads/master' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
teddy@teddy:~ $ brew doctor | |
Your system is raring to brew. | |
teddy@teddy:~ $ brew update | |
Already up-to-date. | |
teddy@teddy:~ $ brew info gtk+ | |
gtk+ 2.24.6 | |
http://www.gtk.org/ | |
Depends on: pkg-config, glib, jpeg, libtiff, gdk-pixbuf, pango, jasper, atk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now that bitbucket supports git, it's easy to use their service as a free, private, offsite code backup. Just create an empty repo for your project on bitbucket, add it as a remote to your development repo: | |
username@host:~/project$ git remote add bitbucket git@bitbucket.org:username/project.git | |
Edit: I had to change in the config file the url value to set the complete https url: https://username@bitbucket.org/username/project.git | |
and use this post-commit hook to silently and automatically push your changes up after each commit. |
At one point at work I needed to run a script several times. As a quick and dirty hack I made this python file that just gives me a list. I then ran it several times changing the month. It's quick, it's messy, but it worked.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from redis import Redis | |
import simplejson | |
class Resque(object): | |
"""Dirt simple Resque client in Python. Can be used to create jobs.""" | |
redis_server = 'localhost:6379' | |
def __init__(self): | |
host, port = self.redis_server.split(':') | |
self.redis = Redis(host=host, port=int(port)) |
OlderNewer