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))
@Braunson
Braunson / debug-wp.php
Created August 19, 2013 18:33
Wordpress Theme Debugging Code - Helping to debug larger complex themes - http://www.braunson.ca/blog/posts/debugging-a-complex-wordpress-theme
<?php
$included_files = get_included_files();
$stylesheet_dir = str_replace( '\\', '/', get_stylesheet_directory() );
$template_dir = str_replace( '\\', '/', get_template_directory() );
foreach ( $included_files as $key => $path ) {
$path = str_replace( '\\', '/', $path );
@Braunson
Braunson / sidebarEffects.js
Last active June 24, 2017 07:16
Added close menu option for codrops/SidebarTransitions. Just add closeMenu as the ID to an item in your st-menu container (in your menu)
/**
* sidebarEffects.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2013, Codrops
* http://www.codrops.com
*/
@Braunson
Braunson / tinyEditor.post-fix.js
Last active December 26, 2015 09:39
TinyEditor sending WYSIWYG content with POST data. This is for use with jQuery.
$(document).ready(function(){
// Add the class submit to your 'submit' button :)
$(".submit").on('click', function(){
editor.post();
});
});
(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;
}