Skip to content

Instantly share code, notes, and snippets.

View etoxin's full-sized avatar

Adam Lusted etoxin

View GitHub Profile
@etoxin
etoxin / never-run.scss
Created March 31, 2015 06:46
Computer breaking Scss
@for $a from 1 through 100{
@for $b from 1 through 100{
@for $c from 1 through 100{
@for $d from 1 through 100{
.margin-#{$a}-#{$b}-#{$c}-#{$d}{
margin: $a $b $c $d;
}
}
}
}
@etoxin
etoxin / grep.md
Last active February 12, 2019 05:54
GREP
Find a file.
$ find . fileName
Recursively find in *
grep -R 'etoxin' *
Exclude a directory
@etoxin
etoxin / exampleOne.html
Created July 23, 2015 03:56
mongo example
<!DOCTYPE html>
<html lang="en">
<head>
<title>Boom!</title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script>
var stuff = {
run: function () {
@etoxin
etoxin / exampleTwo.js
Last active May 9, 2016 23:42
Geolocation logging
$.ajax({
url: "https://api.mongolab.com/api/1/databases/geolocation/collections/boom?apiKey=XXXXXXXXXXXXXXXXXX",
type: "POST",
data: JSON.stringify( object ),
contentType: "application/json"
}).done(function( msg ) {
console.log(msg);
});
@etoxin
etoxin / exampleThree.html
Last active May 9, 2016 23:41
Geolocation example
<!DOCTYPE html>
<html lang="en">
<head>
<title>Boom!</title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script>
var stuff = {
run: function () {
@etoxin
etoxin / Top Entitlement Claiming Federal Politicians in Australia (2H 2014).txt
Last active November 23, 2015 23:03 — forked from dannolan/spendyspendy.txt
Top Entitlement Claiming Federal Politicians in Australia (2H 2014)
Top Spenders OVERALL
The Hon Tony Abbott MP - $1057673
The Hon Julie Bishop MP - $866653
Mr Tony Pasin MP - $851482
Mr Tim Watts MP - $556863
The Hon Andrew Robb AO MP - $539247
The Hon Darren Chester MP - $529344
Mr Wyatt Roy MP - $526258
Senator the Hon Simon Birmingham - $523191
@etoxin
etoxin / PassByReferenceParameters.js
Created October 19, 2015 03:18
Pass By Reference Parameters
var globalVar1 = [5];
var globalVar2 = 5;
console.log('before: ' + globalVar1 + ', ' + globalVar2);
function myFunction(value1, value2){
value1[0]++;
value2++;
console.log('inside: ' + value1 + ', ' + value2);
}
myFunction(globalVar1, globalVar2);
@etoxin
etoxin / example.js
Last active October 21, 2015 00:11
Access global var Browser + Node (Isomorphic)
(function (glob) {
// glob points to global object
}(typeof window !== 'undefined' ? window : global));
@etoxin
etoxin / encryption.sh
Last active October 20, 2015 10:45
How do I simply encrypt a file in terminal.
# encrypt file.txt to file.enc using 256-bit AES in CBC mode
openssl enc -aes-256-cbc -salt -in file.txt -out file.enc
# the same, only the output is base64 encoded for, e.g., e-mail
openssl enc -aes-256-cbc -a -salt -in file.txt -out file.enc
# decrypt binary file.enc
openssl enc -d -aes-256-cbc -in file.enc -out file.txt
# decrypt base64-encoded version
@etoxin
etoxin / collection.csv
Last active January 28, 2016 05:14
RDIO
Name Artist Album Track Number
! (The Song Formerly Known As) Regurgitator Jingles: The Best Of 3
You Got A Killer Scene There, Man... Queens Of The Stone Age Lullabies To Paralyze (International Version) 13
'82 Stone Sour House of Gold & Bones Part 2 7
(515) Slipknot The Studio Album Collection 1999 - 2008 16
(Antichrist Television Blues) Arcade Fire Neon Bible 8
(Antichrist Television Blues) Arcade Fire Neon Bible (Comm CD) 8
(Baby I've Got You) On My Mind Powderfinger Footprints: The Best of Powderfinger 2001 - 2011 2
(Baby I've Got You) On My Mind Powderfinger Fingerprints & Footprints - The Ultimate Collection 19
(Exchange) Massive Attack Mezzanine 11