Skip to content

Instantly share code, notes, and snippets.

View Braunson's full-sized avatar

Braunson Yager Braunson

View GitHub Profile
.falconeer-profile {
.profile {
margin-top: 8px;
width: 92px;
height: 92px;
background-repeat: none;
}
&#ulrik {
.profile { background-image: url(/images/falconeers/Ulrik-side.png?sprite=falconeers); }
@Braunson
Braunson / Encbox.md
Created July 20, 2013 22:56 — forked from Tho85/Encbox.md

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
@Braunson
Braunson / twitter_favouriter.py
Last active November 17, 2019 06:08 — forked from jmoz/twitter_favouriter.py
Converted to work with Python 3.x
from twitter import Twitter, OAuth, TwitterHTTPError
OAUTH_TOKEN = 'foo'
OAUTH_SECRET = 'bar'
CONSUMER_KEY = 'baz'
CONSUMER_SECRET = 'bat'
t = Twitter(auth=OAuth(OAUTH_TOKEN, OAUTH_SECRET, CONSUMER_KEY, CONSUMER_SECRET))
(function($) {
$.fn.utm_tracking = function(domain, source, medium, campaign) {
$(this).find('a[href^="' + domain + '"]').each(function() {
var url = $(this).attr('href');
$(this).attr( 'href', url + '?utm_source=' + source + '&utm_medium=' + medium + '&utm_campaign=' + campaign );
});
}
$.fn.utm_tracking_via_obj = function(domain, utmObj) {
utmObj = utmObj || $.utm_data_from_url();
$(this).find('a[href^="' + domain + '"]').each(function() {
@Braunson
Braunson / gist:9080542
Last active April 11, 2020 15:35 — forked from AstonJ/gist:2896818
Install/Upgrade Ruby on CentOS 6.2 -- Updated ruby to 2.1.0 and yum to 0.1.5
#get root access
$su -
$ cd /tmp
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel
<?php
add_action("gform_field_input", "ih_gform_field_input", 10, 5);
function ih_gform_field_input($input, $field, $value, $lead_id, $form_id){
//wp_debug($field);
if($field["type"] == "vehicleyear"){
//wp_debug($field['choices']);
//$input = 'Aha!';
}
return $input;
}

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

<?php namespace Acme;
use Illuminate\Filesystem\Filesystem;
class Updater {
/**
* The Filesystem instance
*
* @var Illuminate\Filesystem\Filesystem
<?php namespace Acme;
use Illuminate\Filesystem\Filesystem;
class Updater {
/**
* The Filesystem instance
*
* @var Illuminate\Filesystem\Filesystem