Skip to content

Instantly share code, notes, and snippets.

@neoadventist
neoadventist / css-grid.html
Last active March 8, 2019 23:44
CSS Grid Layout Example
<html>
<style>
.container{
}
.container > div{
background-color:#DDD;
padding:10px;
}
.container > div:nth-child(odd){
@neoadventist
neoadventist / cron_helper.sh
Created December 13, 2015 13:18 — forked from liquidgecka/cron_helper.sh
Cron helper
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
@neoadventist
neoadventist / jtri_array_to_special_obj.js
Last active August 29, 2015 14:07
Turning an array to a special kind of object.
//jtri: ok, can't quite wrap my head around this one: how do I turn [ [ 'mike', 'ryan' ], [ 'mike', 'jared' ], [ 'mike', 'jared' ] ] into {"mike": ["ryan", "jared", "jared"], "jared:["mike", "mike"], "ryan":["mike"]} ?
//from falafel
// Helpers
var inArray = function(x) {
return function(xs) {
return xs.indexOf(x) > -1
}
}
@neoadventist
neoadventist / gridchange.sh
Created January 16, 2014 02:49
Shell script to convert bootstrap 2.x grid syste, to the one used in bootstrap 3
#!/bin/bash
find . -name "*.html" -print | xargs sed -i 's/span1/col-md-1/g'
find . -name "*.html" -print | xargs sed -i 's/span2/col-md-2/g'
find . -name "*.html" -print | xargs sed -i 's/span3/col-md-3/g'
find . -name "*.html" -print | xargs sed -i 's/span4/col-md-4/g'
find . -name "*.html" -print | xargs sed -i 's/span5/col-md-5/g'
find . -name "*.html" -print | xargs sed -i 's/span6/col-md-6/g'
find . -name "*.html" -print | xargs sed -i 's/span7/col-md-7/g'
find . -name "*.html" -print | xargs sed -i 's/span8/col-md-8/g'
find . -name "*.html" -print | xargs sed -i 's/span9/col-md-9/g'
@neoadventist
neoadventist / getNaruto.py
Last active December 27, 2015 01:18
Downloads a Naruto video from www.narutonine.com! Run: python getNaruto.py <a> <b> where a<b and a and b is an episode number in Naruto.
#BELEIVE IT!!
print("Jesus Saves");
#import libaries
import sys;
import time;
import urllib;
from urllib import FancyURLopener;
from random import choice;