Skip to content

Instantly share code, notes, and snippets.

View etoxin's full-sized avatar

Adam Lusted etoxin

View GitHub Profile
@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 / 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 / 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 / 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 / cron.md
Last active August 29, 2015 14:17
  • To start editing run the following replacing the "testuser" with your desired runtime user for the node process. If you choose a different user other then yourself, you will have to run this with sudo.

$ crontab -u testuser -e

  • If you have never done this before, it will ask you which editor you wish to edit with. I like vim, but will recommend nano for ease of use.

  • Once in the editor add the following line:

@reboot /usr/local/bin/forever start /your/path/to/your/app.js

  • Save the file. You should get some feedback that the cron had been installed.
@etoxin
etoxin / complex-each.scss
Created March 23, 2015 04:01
Complex Each in Sass / scss
// icon colouring.
$icon-color-set: (black $black),
(white $white),
(green $green),
(orange $orange),
(red $red),
(utility-blue $utility-blue),
(ocean-blue $ocean-blue),
(transition-blue2 $transition-blue2),
(transition-blue3 $transition-blue3),
@etoxin
etoxin / Powershell.ps1
Created March 17, 2015 23:20
Powershell Commands
# Find in file. (Grep)
Select-String stringYouWantToSearch .\fileYouWantToSearch.txt
@etoxin
etoxin / ssh.md
Last active June 10, 2020 14:20
SSH

tunnel a remote port on a server to your local machine

ssh -L 12345:localhost:5984 user@website.com

Tunnel a Website through your server to a pre defined port.

blocked websites.

@etoxin
etoxin / simple-server.sh
Created December 18, 2014 10:06
Simple Server
python -m SimpleHTTPServer