Skip to content

Instantly share code, notes, and snippets.


Alex Rodriguez arod2634

View GitHub Profile
arod2634 / add-wp-admin.sql
Created Oct 22, 2018
WordPress - Add Admin User to DB via SQL
View add-wp-admin.sql
INSERT INTO `db_table_name`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('999999', 'alpinealex', MD5('password'), 'Alpine Alex', '', '', '1999-01-01 00:00:00', '', '0', 'Alpine Alex');
INSERT INTO `db_table_name`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '999999', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `db_table_name`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '999999', 'wp_user_level', '10');
ignasi /
Last active Feb 7, 2021
Android XXHDPI Resizer (Tested on OS X Mavericks)
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi
# fake argv and argc in bash
argc=$#; argv[0]=$0 # argv[0] is a prog name
for foo in $( seq $argc )
jbenet /
Last active Oct 6, 2021
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

ficusk /
Last active Aug 29, 2020
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
ericjuden / create-sample-tables.php
Last active Dec 14, 2015
WordPress Custom Tables
View create-sample-tables.php
Plugin Name: Create Sample Tables Plugin
Plugin URI:
Description: Create some dummy tables
Version: 1.0
Author: ericjuden
Author URI:
ericjuden / create.php
Last active Feb 3, 2019
WordPress CRUD
View create.php
// Create a new record in a table
global $wpdb;
// data to be added
$data = array(
'post_title' => __('This is a test'),
'post_content' => __('This is really long text'),
'post_status' => __('draft')
arod2634 / custom-wp-dashboard.php
Created Sep 21, 2012
Customize Wordpress Admin Dashboard
View custom-wp-dashboard.php
//Add a custom admin dashboard welcome widget
function custom_dashboard_widget() {
echo '<h1>Welcome to your new WordPress site built by an awesome developer</h1>';
function add_custom_dashboard_widget() {
wp_add_dashboard_widget('custom_dashboard_widget', 'Integrity Welcomes You To WordPress!', 'custom_dashboard_widget');
add_action('wp_dashboard_setup', 'add_custom_dashboard_widget');
Ollo / wordpress-search-jquery
Created Jun 11, 2012
wordpress jquery search field behavior
View wordpress-search-jquery
// search box behavior text behavior
if($('.searchField').val() == '')
ScottPhillips / .htaccess
Created Feb 2, 2012
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /
incanus /
Created Sep 1, 2011
Xcode 4 scheme Archive step Post-script for automatic TestFlight build uploading. See the blog post here:
# (Above line comes out when placing in Xcode scheme)
API_TOKEN=<TestFlight API token here>
TEAM_TOKEN=<TestFlight team token here>
SIGNING_IDENTITY="iPhone Distribution: Development Seed"
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision"