Skip to content

Instantly share code, notes, and snippets.

View gnu-user's full-sized avatar

Jonathan Gillett gnu-user

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gnu-user on github.
  • I am gnu_user (https://keybase.io/gnu_user) on keybase.
  • I have a public key ASAUKdUn1dROfLNqM_RHHzqhjx7murMacorksRiAoUnm3Qo

To claim this, I am signing this object:

@gnu-user
gnu-user / setup.sh
Last active January 15, 2017 20:39
Linux Setup Script
#!/bin/bash
# To install the build systems and tools
sudo apt-get update -y
sudo apt-get install -y build-essential clang lldb valgrind htop vim git
# Install chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update -y
@gnu-user
gnu-user / tinfoil-sms crash
Created January 10, 2014 03:41
Tinfoil-SMS Crash Log
01-09 22:39:10.846: E/AndroidRuntime(6751): FATAL EXCEPTION: main
01-09 22:39:10.846: E/AndroidRuntime(6751): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tinfoil.sms/com.tinfoil.sms.sms.ConversationView}: android.database.sqlite.SQLiteException: 11 values for 10 columns (code 1): , while compiling: INSERT OR IGNORE INTO walkthrough (id, intro,start_import, import,start_exchange, set_secret,pending, accept,success, close) VALUES (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
01-09 22:39:10.846: E/AndroidRuntime(6751): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
01-09 22:39:10.846: E/AndroidRuntime(6751): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
01-09 22:39:10.846: E/AndroidRuntime(6751): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-09 22:39:10.846: E/AndroidRuntime(6751): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-09 22:39:10.846: E/AndroidRuntime(6751): at android.o
@gnu-user
gnu-user / gist:5703269
Created June 4, 2013 02:57
Apache Virtual Hosts Configuration
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
@gnu-user
gnu-user / gist:5691987
Created June 1, 2013 22:54
Add 10 test accounts for testing the elections website
INSERT INTO ucsc_members VALUES ('Bobby', 'Tables', AES_ENCRYPT('100123456', 'test123'), 'test@gmail.com', 'test1', AES_ENCRYPT('DEADBEEFtest123', 'test123'), NULL, '2012-01-23', CURDATE(), TRUE);
INSERT INTO ucsc_members VALUES ('Timmy', 'Tables', AES_ENCRYPT('100123456', 'test123'), 'test@gmail.com', 'test2', AES_ENCRYPT('DEADBEEFtest123', 'test123'), NULL, '2013-01-23', CURDATE(), TRUE);
INSERT INTO ucsc_members VALUES ('Jimmy', 'Tables', AES_ENCRYPT('100123456', 'test123'), 'test@gmail.com', 'test3', AES_ENCRYPT('DEADBEEFtest123', 'test123'), NULL, '2013-01-03', CURDATE(), TRUE);
INSERT INTO ucsc_members VALUES ('Harry', 'Tables', AES_ENCRYPT('100123456', 'test123'), 'test@gmail.com', 'test4', AES_ENCRYPT('DEADBEEFtest123', 'test123'), NULL, '2013-01-03', CURDATE(), TRUE);
INSERT INTO ucsc_members VALUES ('Larry', 'Tables', AES_ENCRYPT('100123456', 'test123'), 'test@gmail.com', 'test5', AES_ENCRYPT('DEADBEEFtest123', 'test123'), NULL, '2012-05-03', CURDATE(), TRUE);
@gnu-user
gnu-user / diff.py
Created March 18, 2013 00:23
Diff.py use instead of the normal diff if you want git to use meld for diffing files.
#!/usr/bin/python
import sys
import os
os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5]))
@gnu-user
gnu-user / layout.txt
Created February 22, 2013 19:14
The structure/layout of the front-end project
front-end
src/
include/
lib/
include/
Poco/
...
...poco header files..
...
static/
@gnu-user
gnu-user / PocoTest.cpp
Created February 22, 2013 19:10
A sample program to verify you have POCO installed and your makefiles are done right.
#include <iostream>
#include <string>
#include <stdio.h>
#include <Poco/String.h>
using Poco::trim;
using Poco::trimLeftInPlace;
using Poco::trimRight;
using Poco::trimRightInPlace;
#
# deploy a static page on heroku
# ------------------------------
#
#
# required site structure:
#
# name-of-site
# |- config.ru
# +- public
@gnu-user
gnu-user / .gitconfig
Last active December 12, 2015 08:09
GIT CONFIGURATION FILE
[user]
name = ...
email = ...
[github]
user = ...
token = ...
[diff]
external = /usr/bin/diff.py
[alias]
co = checkout