Skip to content

Instantly share code, notes, and snippets.

View Jpunt's full-sized avatar

Jasper Haggenburg Jpunt

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TestConsoleTheme</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TestConsoleTheme</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@Jpunt
Jpunt / drobo_check.py
Created May 7, 2013 06:57
Python script I use to check the health of my Drobo, which is connected to a Raspberry Pi. Output is emailed by the cronjob daily. Needs Drobo-Utils to work properly: http://drobo-utils.sourceforge.net and you will have to edit the paths for your setup.
#! /usr/bin/env python
import subprocess
import re
# Settings
diskPath = '/dev/sda'
mountPath = '/media/drobo'
# Get status
command = "/usr/sbin/drobom status"
/*global $ */
/*
_______ _______ _______ _______ _______ _______ _______ ___ _
| || _ || || || _ || || || | | |
| ___|| |_| || || ___|| |_| || _ || _ || |_| |
| |___ | || || |___ | || | | || | | || _|
| ___|| || _|| ___|| _ | | |_| || |_| || |_
| | | _ || |_ | |___ | |_| || || || _ |
@Jpunt
Jpunt / jquery.animate.js
Last active December 18, 2015 04:49
Patch for $.animate to use $.transit when possible, and provide fallbacks for things like translateX/Y.
/*globals $ */
/*
* Patches the jQuery-animate method to use CSS-transitions when possible.
*
* - Depends on $.transit: http://ricostacruz.com/jquery.transit/
* - Degrades gracefully to the original method when transitions aren't supported.
* - Provides fallbacks for translateX/Y's, so { x:10, y:10 } (very smooth) will become { top:10, left:10 } (less smooth) for less capable browsers.
* - 3d-transforms could be enabled with enable3d:true. Example: { x:100, enable3d:true }
* - Transitions could be disabled with enableTransitions:false. Example: { x:100, enableTransitions:false }
@Jpunt
Jpunt / gist:6670095
Created September 23, 2013 13:03
Grid-system als CSS
<section class="results-container">
<div class="result-count">
<p class="block-left bg-light padding">
@if(this.Model.SearchResult.Results.Any())
{
@Html.T(this.Model.SearchResult.Total, "{0} object gevonden", "{0} objecten gevonden", "Found {0} work of art", "Found {0} works of art", this.Model.SearchResult.Total)</p>
}
else
{
@Jpunt
Jpunt / gist:6670103
Created September 23, 2013 13:04
Grid-system als OOCSS
<section class="row">
<div class="col all-full">
<p class="block-left bg-light padding">
@if(this.Model.SearchResult.Results.Any())
{
@Html.T(this.Model.SearchResult.Total, "{0} object gevonden", "{0} objecten gevonden", "Found {0} work of art", "Found {0} works of art", this.Model.SearchResult.Total)</p>
}
else
{
@Html.T("Geen resultaten", "No results")
/*global $ */
/*
_______ _______ _______ _______ _______ _______ _______ ___ _
| || _ || || || _ || || || | | |
| ___|| |_| || || ___|| |_| || _ || _ || |_| |
| |___ | || || |___ | || | | || | | || _|
| ___|| || _|| ___|| _ | | |_| || |_| || |_
| | | _ || |_ | |___ | |_| || || || _ |
@Jpunt
Jpunt / moveit.js
Created December 30, 2013 20:28
Little node-script to find *.iso's in my collection and move them to temporary directories to either encode, redownload or delete them later on.
var glob = require('glob');
var path = require('path');
var cli = require('cline')();
var fs = require('fs');
var fromBase = '/Volumes/Video/Movies';
var toDownload = '/Volumes/Video/TODO/Download';
var toEncode = '/Volumes/Video/TODO/Encode';
var toDelete = '/Volumes/Video/TODO/Delete';
@Jpunt
Jpunt / encode.sh
Last active January 1, 2016 20:09
A tiny bit of ZSH and Handbrake-magic to encode DVD's into mp4's
#!/usr/bin/env zsh
#
# Turns ISO-files and VIDEO_TS-directories from $encode_path into decent H264-encoded mp4's (audio/subtitle-tracks are included).
#
# Requirements:
# - ZSH
# - HandBrakeCLI
encode_path=~/Desktop/Encode
handbrake_path=/usr/bin/HandBrakeCLI