Skip to content

Instantly share code, notes, and snippets.

View blizzrdof77's full-sized avatar

Ben Wagner blizzrdof77

View GitHub Profile
@blizzrdof77
blizzrdof77 / histdel.sh
Created May 9, 2018 10:04 — forked from josephabrahams/histdel.sh
Delete previous line in .bash_history
#!/bin/sh
hist=$(history | tail -1 | awk '{ print $1 }'); history -d $hist; history -d $(expr $hist - 1); unset hist
@blizzrdof77
blizzrdof77 / String.camelCaseToDashed.js
Last active January 4, 2018 19:21 — forked from youssman/regex-camelCase-to-dash.js
Javascript convert camelcase to dash (hyphen)
/**
* Convert camelCase string to lowercase string with dashes (pretty permalink style ;-)
*
* @return String
*/
String.prototype.camelCaseToDashed = function() {
return this.replace( /([a-z])([A-Z])/g, '$1-$2' ).toLowerCase();
};
@blizzrdof77
blizzrdof77 / String.prototype.dashToCamelCase.js
Last active January 4, 2018 19:15 — forked from youssman/dash-to-camelCase.js
Javascript convert dash (hyphen) to camelcase
/**
* Convert string with dashes to camel case
*
* @return String
*/
String.prototype.dashToCamelCase = function() {
return this.replace(/-([a-z])/g, function(g) {
return g[1].toUpperCase();
});
};
/**
* Force GFORM Scripts inline next to Form Output
*
* force the script tags inline next to the form. This allows
* us to regex them out each time the form is rendered.
*
* see strip_inline_gform_scripts() function below
* which implements the required regex
*/
function force_gform_inline_scripts() {
@blizzrdof77
blizzrdof77 / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console