Skip to content

Instantly share code, notes, and snippets.

View stinsonga's full-sized avatar
🚀

George S stinsonga

🚀
View GitHub Profile
@stinsonga
stinsonga / reddit-comment-delete.js
Created January 24, 2020 16:37
Reddit Comment Deletion
location.href = "javascript:(" + function()
{
var deleted = 0;
var links = document.getElementsByTagName("a");
var i = 0;
var d = 0;
@stinsonga
stinsonga / key.md
Created February 27, 2019 23:17
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@stinsonga
stinsonga / pagination.md
Created February 2, 2016 13:11 — forked from mislav/pagination.md
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

@stinsonga
stinsonga / string.java
Created January 14, 2016 16:10
Checking for a null or empty String in Java
//This works...
String myString = null;
if (myString != null && !myString.isEmpty()) {
//do stuff
}
//Covers both cases; less verbose
if (!StringUtils.isEmpty(myString)) {
//do stuff
}
@stinsonga
stinsonga / camera.py
Created November 16, 2015 01:22
My picamera script
import picamera
from time import sleep
import time
import os, sys
camera = picamera.PiCamera()
camera.resolution = (960, 720)
archive = []
SLEEP_TIME = 5
@stinsonga
stinsonga / gist:a923eb1710967cd18b10
Created January 15, 2015 17:16
Setting proper permissions for ~/.ssh/authorized_keys on an Ubuntu server
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
@stinsonga
stinsonga / .gitignore
Last active August 29, 2015 14:10
.gitignore used in my Android projects
# Files built/generated locally.
# You generally won't want to commit these
bin/
gen/
*.apk
*.ap_
# The generated .class files, which can also be excluded
*.class
@stinsonga
stinsonga / gist:879f02eacb6c5f22f60d
Last active August 29, 2015 14:06
Setting command line PHP to use MAMP in OSX
1. Open your ~/.bash_profile with your preferred editor
This should work from the command line:
nano ~/.bash_profile
2. Check to see which version of PHP your MAMP uses, and note the path, which will look something like this:
/Applications/MAMP/bin/php/php5.4.10/bin
3. Add the following line (changing to match your PHP version):
@stinsonga
stinsonga / AES.c
Created February 24, 2014 07:28 — forked from bricef/AES.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>