Skip to content

Instantly share code, notes, and snippets.

View spences10's full-sized avatar
💭
SvelteKit is bae!

Scott Spence spences10

💭
SvelteKit is bae!
View GitHub Profile
@tahl
tahl / andadb.sh
Created January 22, 2012 19:33
andadb2.0 modified script (Ubuntu)
#!/bin/bash
#
#Android ADB Installer 2 for Linux Mint 11 and Ubuntu 11.04
#This version is intended to be an improvement on previous version and give the user more installation options and bring more ease to people that want to develop,
#theme, or just whatever other purpose you may want to use something that is in my script for.
#Script written by @ArchDukeDoug and parts of @_CorCor67's scripting code used with permission as well.
#Thanks to @BoneyNicole, @tabbwabb, and @animedbz16 for putting up with me and proofreading and/or testing the script.
#Script version: 2.0.0
menu=
pkg=$(adb shell pm path com.koushikdutta.backup)
# apparently pm path appends a carriage return which screws
# up the class name in dalvikvm invocation
pkg=$(echo $pkg | cut -d : -f 2 | sed s/\\r//g)
echo $pkg
adb shell << EOF
CLASSPATH=$pkg app_process /system/bin com.koushikdutta.shellproxy.ShellRunner2 $@ &
exit
EOF
## Acer
#SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0600", OWNER="<username>"
## ASUS
#SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0600", OWNER="<username>"
## Dell
#SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0600", OWNER="<username>"
## Foxconn
@martynhaigh
martynhaigh / .bashrc
Last active December 15, 2015 12:59
My messy bash rc file
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@johnkil
johnkil / DbUtils.java
Last active December 16, 2015 13:48
Utilities to work with SQLite database (based on http://udinic.wordpress.com/2012/05/09/sqlite-drop-column-support).
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.text.TextUtils;
/**
@pdewouters
pdewouters / quotes.json
Created October 14, 2015 09:37
Quotes
[
{
"property1": "A quote by Hunter S. Thompson, 1937 - 2005",
"property2": "Whatever else might be said about Nixon — and there is still serious doubt in my mind that he could pass for human — he is a goddamned stone fanatic on every aspect of pro football.\nHunter S. Thompson",
"index": 1,
"url": "http://www.qotd.org/search/single.html?qid=1"
},
{
"property1": "A quote by Anonymous",
"index": 2,
@Danib17
Danib17 / .json
Last active December 21, 2016 10:54
Quotes
[
{
"quoteID": 1,
"quote": "Efforts and courage are not enough without purpose and direction.",
"author": "John F Kennedy",
"description": "35th President of the USA",
"profile": "http://markmcmillion.com/wp-content/uploads/2014/03/JFK-150x150.jpg",
"portrait": "http://bit.ly/1Q6aObg",
"bio": "John F Kennedy was a president of the United States of America"
},
@jamiecurran
jamiecurran / gist:d345bbb507626d3ec667
Created December 10, 2014 09:50
Recruiter Advice
I'm really trying not to be rude but the number of recruiter spam I'm getting is really becoming irritating. For future reference:
a) Don't email me an opportunity off the back of a key word search. Check out my cv or linkedin profile before forwarding opportunities. It really shows a complete lack of effort on your part
b) I've dealt with a lot of recruiters in my time. A £500 referral fee in pathetic considering the potential fee your company receives on each placement.
Going forward, I'll be telling my network of technical people about every recruiter/recruitment company which clearly isn't concerned about the level of service they provide and shows a distinct lack of effort when it comes to matching potential candidates to a role. As you know, the London tech scene is very similar to the game 'six degrees of kevin bacon' - word gets around.
I hope this provides some insight and helps with future placements.
Kind Regards
// Creating promises
var promise = new Promise(function (resolve, reject) {
resolve('all good')
})
promise.then(function (result) {
console.log('was it good?', result)
}).catch(function (err) {
console.error('ERR', err)
})
@spences10
spences10 / firebase-cheat-sheet.md
Created February 15, 2017 16:17
Firebase cheat sheet

Firebase Cheat Sheet

Hosting

Cloud 9 IDE

Logging into firebase you sould use firebase login --no-localhost

CLI Commands