Skip to content

Instantly share code, notes, and snippets.

View DanielBoerlage's full-sized avatar

Daniel Boerlage DanielBoerlage

  • Vancouver, BC, Canada
View GitHub Profile
#!/bin/bash
# todo: some stuff
curl -s -o ~/Pictures/wallpaper \
$(curl -s 'http://www.reddit.com/r/EarthPorn' \
| tr '"' '\n' \
| egrep '^http://i\.imgur\.com/' \
| head -1)
feh --bg-scale ~/Pictures/wallpaper
@DanielBoerlage
DanielBoerlage / Spacegray.sublime-theme
Last active August 29, 2015 14:23
Spacegray mods
[
//
// TABS (REGULAR)
//
// Tab set
{
"class": "tabset_control",
"layer0.texture": "",
@DanielBoerlage
DanielBoerlage / song
Created May 12, 2015 20:24
music stuff
alias getsong='youtube-dl --default-search "gvsearch1:" -x --audio-format opus --audio-quality 64K -o ~/Music/%\(title\)s.%\(ext\)s'
playsong() {
search_q="^`printf "(?=.*%s)" "$@"`.+"
song_file=`find ~/Music | grep -iP --color=never "$search_q"`
if [[ -z "$song_file" ]]
then
echo -e "\e[1mno local songs found"
wget $(youtube-dl -f 140 -g --default-search "gvsearch1:" "song $*") -O - 2>/dev/null | \
mplayer -nolirc -msgcolor -msglevel all=0:statusline=5 /dev/fd/3 3<&0 </dev/tty
DEP_DIR="/usr/local/lib"
# Usage:
# Bash function libraries start with the line
# depends lib-1 lib-2
# And bash scripts start with the line
# source depends lib-1 lib-3
function depends {
for dependency in "$@"
<p><strong>dict var</strong>&nbsp;<em>is</em></p>
<table width="100%">
<tbody>
<tr>
<td>eggs</td>
<td>
<table width="100%">
<tbody>
@DanielBoerlage
DanielBoerlage / Keyboard.pde
Last active August 29, 2015 14:16
Processing keyboard input
import java.awt.event.KeyListener;
import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.FocusEvent;
import static java.awt.event.KeyEvent.*;
/*
* Keyboard input handler for processing
* Coded with care by Daniel Boerlage 2015
*
// {DB} 2015
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <Windows.h>
#define RESET "\033[0m"
#define WHITE "\033[1;37m"
@DanielBoerlage
DanielBoerlage / navajo_encrypt
Last active August 29, 2015 14:14
high level encryption government standard
#!/bin/python
# Daniel Boerlage 2015
# warning:
# this code sucks
# this is my first script written in python
# no effort was put into optimizing it or using proper data structures
@DanielBoerlage
DanielBoerlage / config.cson
Last active August 29, 2015 14:14
atom config
"*":
"*":
minimap:
displayPluginsControls: false
minimapScrollIndicator: false
"exception-reporting":
userId: "11c7066a-d91f-df88-a711-42c4d6d9a9d6"
welcome:
showOnStartup: false
core:
@DanielBoerlage
DanielBoerlage / build.properties
Created June 7, 2014 03:36
build file for Implicit Plot
# Example build.properties file for the generic ant build file by Daniel Boerlage 2014 - version 0.1.0
# Most imortant to change this
backup.dir=C:/Users/Daniel/Desktop/code-backups/${ant.project.name}
# Change this if you dont want the automatic backup to compress your project files
backup.compress=true
src.dir=src
bin.dir=bin