Skip to content

Instantly share code, notes, and snippets.

View budda's full-sized avatar
💁‍♂️

Mike Carter budda

💁‍♂️
View GitHub Profile
@budda
budda / modernizr.min.js
Created April 18, 2016 15:56
modernizr 3.3.1 suitable for use with Drupal navbar module. Generated from https://modernizr.com/download/?details-inputtypes-svg-addtest-prefixes-setclasses-teststyles
/*! modernizr 3.3.1 (Custom Build) | MIT *
* http://modernizr.com/download/?-details-inputtypes-svg-addtest-prefixes-setclasses-teststyles !*/
!function(e,t,n){function i(e,t){return typeof e===t}function o(){var e,t,n,o,s,a,r;for(var l in u)if(u.hasOwnProperty(l)){if(e=[],t=u[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=i(t.fn,"function")?t.fn():t.fn,s=0;s<e.length;s++)a=e[s],r=a.split("."),1===r.length?Modernizr[r[0]]=o:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=o),d.push((o?"":"no-")+r.join("-"))}}function s(e){var t=m.className,n=Modernizr._config.classPrefix||"";if(g&&(t=t.baseVal),Modernizr._config.enableJSClass){var i=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(i,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),g?m.className.baseVal=t:m.className=t)}functi
@budda
budda / keybase.md
Created April 12, 2014 17:44
Keybase.io verification process.

Keybase proof

I hereby claim:

  • I am budda on github.
  • I am budda (https://keybase.io/budda) on keybase.
  • I have a public key whose fingerprint is 88DB 399A 8318 71C7 2D39 BD29 8D3D 9E53 B67D 1E01

To claim this, I am signing this object:

@budda
budda / database_rename.sql
Created January 20, 2013 00:49
A nice snippet to generate the SQL statements to move each individual table over to a new database - aka database renaming for MySQL. $1 and $2 are source and target respectively
SELECT concat('RENAME TABLE $1.',table_name, ' TO $2.',table_name, ';')
FROM information_schema.TABLES
WHERE table_schema='$1';
@budda
budda / cookiecontrol_generatesitecookie
Created May 17, 2012 22:41
Server side cookie control
if ($_COOKIE[cookiecontrol_generatesitecookie()]) {
$_SESSION['a_variable'] = '...';
}