Skip to content

Instantly share code, notes, and snippets.

View tijptjik's full-sized avatar

Mart van de Ven tijptjik

View GitHub Profile
@tijptjik
tijptjik / BASH-ExtensionLowerCase
Created August 24, 2011 13:26
BASH command to convert all .JPG files to lower case
find . -type f ! -name *.jpg -print0 | xargs -0 rename .JPG .jpg
@tijptjik
tijptjik / .bashrc
Created February 22, 2012 05:25
mTypeHK .bashrc with Fedora // Git aliases . Put it in your home directory
#!/bin/bash
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='\[\e[1;34m\]\u\[\e[m\] \[\e[0;32m\]\w\[\e[m\] $(parse_git_branch) \[\e[1;34m\]\$ \[\e[m\]\[\e[0;37m\]'
#PS1='\[\e[1;34m\]\u\[\e[m\] \[\e[0;32m\]\w\[\e[m\] \[\e[1;34m\]\$ \[\e[m\]\[\e[0;37m\]'
# If not running interactively, don't do anything
@tijptjik
tijptjik / jquery.ba-tinypubsub.js
Created March 4, 2012 15:03 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
<html><head><title>Enter Play</title></head>
<body>
<form action='http://www.boardgamegeek.com/geekplay.php' method='GET'>
<input type='hidden' name='action' value='save'>
<input type='hidden' name='version' id='quickplay_version' value='2'>
<input type='hidden' name='objecttype' id='quickplay_objecttype' value='thing'>
<input type='hidden' name='playid' id='quickplay_playid' value=''>

Desktop Setup

DESKTOP - 2014

| TYPE | BRAND | MODEL | PRICE | | ---: | --------------------------------- | ----: | | CASE | CM | [Silencio 652][13] | $830 | | PSU | SeaSonic | [M12II-650 Bronze][2] | REUSE | | MBRD | ASUS | [Z87-PRO][14] | $1730 | | CPU | Intel | [Core i7-4770][15] | $2620 |

@tijptjik
tijptjik / wine.csv
Created March 7, 2014 09:47
Wine Dataset
Wine Alcohol Malic.acid Ash Acl Mg Phenols Flavanoids Nonflavanoid.phenols Proanth Color.int Hue OD Proline
1 14.23 1.71 2.43 15.6 127 2.8 3.06 .28 2.29 5.64 1.04 3.92 1065
1 13.2 1.78 2.14 11.2 100 2.65 2.76 .26 1.28 4.38 1.05 3.4 1050
1 13.16 2.36 2.67 18.6 101 2.8 3.24 .3 2.81 5.68 1.03 3.17 1185
1 14.37 1.95 2.5 16.8 113 3.85 3.49 .24 2.18 7.8 .86 3.45 1480
1 13.24 2.59 2.87 21 118 2.8 2.69 .39 1.82 4.32 1.04 2.93 735
1 14.2 1.76 2.45 15.2 112 3.27 3.39 .34 1.97 6.75 1.05 2.85 1450
1 14.39 1.87 2.45 14.6 96 2.5 2.52 .3 1.98 5.25 1.02 3.58 1290
1 14.06 2.15 2.61 17.6 121 2.6 2.51 .31 1.25 5.05 1.06 3.58 1295
1 14.83 1.64 2.17 14 97 2.8 2.98 .29 1.98 5.2 1.08 2.85 1045
@tijptjik
tijptjik / fabfile.py
Created March 15, 2014 11:40
Fabric OS check
def osname():
ostype = run('echo $OSTYPE')
if ostype == 'darwin':
return 'OSX'
elif ostype == 'linux-gnu':
return run('cat /etc/os-release | grep -Po \'^NAME="?\K([^"]+)\'')

README is empty

/* Monokai */
div.CodeMirror-lines {
/* background-color: #222222;
color: white; */
border: 0px;
/* padding-top: 1em; */
padding-bottom: 1em;
}
/* Based on Sublime Text's Monokai theme */
var css_url = 'https://gist.githubusercontent.com/tijptjik/10038965/raw/73d92061648c72c7c621345243bc16f2577c60db/custom.css'
$('<link>')
.appendTo($('head'))
.attr({type : 'text/css', rel : 'stylesheet'})
.attr('href', css_url);