Skip to content

Instantly share code, notes, and snippets.

@neoadventist
neoadventist / css-grid.html
Last active Mar 8, 2019
CSS Grid Layout Example
View css-grid.html
<html>
<style>
.container{
}
.container > div{
background-color:#DDD;
padding:10px;
}
.container > div:nth-child(odd){
View cron_helper.sh
#!/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 Aug 29, 2015
Turning an array to a special kind of object.
View jtri_array_to_special_obj.js
//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 Jan 16, 2014
Shell script to convert bootstrap 2.x grid syste, to the one used in bootstrap 3
View gridchange.sh
#!/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 Dec 27, 2015
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.
View getNaruto.py
#BELEIVE IT!!
print("Jesus Saves");
#import libaries
import sys;
import time;
import urllib;
from urllib import FancyURLopener;
from random import choice;
You can’t perform that action at this time.