Skip to content

Instantly share code, notes, and snippets.

View morganestes's full-sized avatar

Morgan Estes morganestes

View GitHub Profile
@boogah
boogah / Favorite Alfred Workflows.md
Last active December 29, 2017 19:41
My Favorite Alfred Searches & Workflows
@boogah
boogah / euro_unicode_cruft_fix.sql
Last active December 10, 2015 22:58
A fix for European Unicode character weirdness. Other character fixes are available here: https://gist.github.com/1379880
update wp_posts set post_content = replace(post_content,'ä','ä');
update wp_posts set post_title = replace(post_title,'ä','ä');
update wp_comments set comment_content = replace(comment_content,'ä','ä');
update wp_postmeta set meta_value = replace(meta_value,'ä','ä');
update wp_posts set post_excerpt = replace(post_excerpt,'ä','ä');
update wp_terms set name = replace(name,'ä','ä');
update wp_posts set post_content = replace(post_content,'ö','ö');
update wp_posts set post_title = replace(post_title,'ö','ö');
update wp_comments set comment_content = replace(comment_content,'ö','ö');
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active November 25, 2024 14:56
Using Git with Subversion Mirroring for WordPress Plugin Development
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@kuyseng
kuyseng / gist:2792119
Created May 26, 2012 04:01
javascript: indesign get date string
function get_date_string(para_date) {
var date = para_date || new Date();
var day = (date.getDate() > 10 ) ? date.getDate() : ("0" + date.getDate() ),
month = ((date.getMonth()+1) > 10 ) ? (date.getMonth()+1) : ("0" + (date.getMonth()+1) ),
year = (date.getFullYear() > 10 ) ? date.getFullYear() : ("0" + date.getFullYear() ),
hours = (date.getHours() > 10 ) ? date.getHours() : ("0" + date.getHours() ),
minutes = (date.getMinutes() > 10 ) ? date.getMinutes() : ("0" + date.getMinutes() );
return year + month + day + "_" + hours + minutes;
};
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
@jmif
jmif / login_form.html
Created April 22, 2012 18:47
Twitter Bootstrap Navbar Login Form HTML
<form action="[YOUR ACTION]" method="post" accept-charset="UTF-8">
<input id="user_username" style="margin-bottom: 15px;" type="text" name="user[username]" size="30" />
<input id="user_password" style="margin-bottom: 15px;" type="password" name="user[password]" size="30" />
<input id="user_remember_me" style="float: left; margin-right: 10px;" type="checkbox" name="user[remember_me]" value="1" />
<label class="string optional" for="user_remember_me"> Remember me</label>
<input class="btn btn-primary" style="clear: left; width: 100%; height: 32px; font-size: 13px;" type="submit" name="commit" value="Sign In" />
</form>
@orbitaloop
orbitaloop / executeSqlBridgeForPhonegapSQLitePlugin.js
Created March 10, 2012 01:03
executeSql Bridge For PhonegapSQLitePlugin (because there are some differences between the WebSQL API and the plugin)
/* to use WebSQL or the SQLite plugin (https://github.com/davibe/Phonegap-SQLitePlugin) with the same function) */
executeSqlBridge: function(tx, sql, params, dataHandler, errorHandler) {
var self = this;
if (typeof self.db.dbPath !== 'undefined') {
//Native SQLite DB with phonegap : https://github.com/davibe/Phonegap-SQLitePlugin/
//this is a native DB, the method signature is different:
var sqlAndParams = [sql].concat(params);
var cb = function(res) {
@Rarst
Rarst / r-debug.php
Last active March 27, 2025 16:58
R Debug (set of dump helpers for debug)
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/
@ziadoz
ziadoz / awesome-php.md
Last active February 3, 2025 20:55
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.