Skip to content

Instantly share code, notes, and snippets.

View peakwinter's full-sized avatar

Jacob Cook peakwinter

View GitHub Profile
@peakwinter
peakwinter / tentd-admin-git-readme
Created March 11, 2013 01:29
README for installing tentd-admin-git from the AUR
Now that your packages are installed properly, you must create a
PostgreSQL user, initialize the database, and run the command to start
the server.
If this is the first time you've installed or run PostgreSQL, run the
following commands to setup and initialize the database directory:
# sudo mkdir /var/lib/postgres/data
# sudo chown -c postgres:postgres /var/lib/postgres/data
# sudo initdb -D ‘/var/lib/postgres/data’
@peakwinter
peakwinter / gist:8305339
Created January 7, 2014 19:30
Force SSL
server {
listen 80;
server_name yoursitename;
rewrite ^ https://$server_name$request_uri? permanent;
}
@peakwinter
peakwinter / genpasswd.py
Created February 12, 2014 17:40
Generate Genesis user credentials line from cmd
#!/usr/bin/env python
import getpass
import sys
from hashlib import sha1
from base64 import b64encode
from passlib.hash import sha512_crypt, bcrypt
def hashpw(passw, scheme = 'sha512_crypt'):
"""

Keybase proof

I hereby claim:

  • I am peakwinter on github.
  • I am peakwinter (https://keybase.io/peakwinter) on keybase.
  • I have a public key whose fingerprint is 8DC6 3ED6 F0E6 29D9 8A53 256D 8F00 446A E49F 2D26

To claim this, I am signing this object:

@peakwinter
peakwinter / gist:10684664
Created April 14, 2014 21:41
nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
2014-05-13 20:34:34 LOG_ERR: [micro.peakwinter.net:1479.a631703c POST /main/ostatusgroup] HTTPClient: HTTP POST https://status.vinilox.eu/main/salmon/group/1987 - 400 Bad Request
2014-05-13 20:34:34 LOG_ERR: [micro.peakwinter.net:1479.a631703c POST /main/ostatusgroup] Salmon (MagicEnvelope) at https://status.vinilox.eu/main/salmon/group/1987 returned status 400:
2014-05-13 20:34:39 LOG_ERR: [micro.peakwinter.net:1479.a631703c POST /main/ostatusgroup] HTTPClient: HTTP POST https://status.vinilox.eu/main/salmon/group/1987 - 400 Bad Request
2014-05-13 20:34:39 LOG_ERR: [micro.peakwinter.net:1479.a631703c POST /main/ostatusgroup] Salmon (MagicEnvelopeCompat) at https://status.vinilox.eu/main/salmon/group/1987 returned status 400:
2014-05-13 20:34:39 LOG_INFO: [micro.peakwinter.net:1479.a631703c POST /main/ostatusgroup] Ostatus_profile::subscriberCount SUB COUNT BEFORE: 0
2014-05-13 20:34:39 LOG_INFO: [micro.peakwinter.net:1479.a631703c POST /main/ostatusgroup] Ostatus_profile::subscriberCount SUB COUNT AFTER: 0
import os
import re
import subprocess
import sys
import urllib2
def install():
print "Installing new packages..."
# Install new mirrorlist
#!/usr/bin/env python2
import ConfigParser
import getpass
import glob
import os
import pacman
import shutil
import subprocess
import os
import re
import subprocess
import sys
import urllib2
def install():
print "Installing new packages..."
# Install new mirrorlist
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;