Skip to content

Instantly share code, notes, and snippets.

View brianjking's full-sized avatar
💭
Doin' cool stuff at BrandMuscle AI

Brian J King brianjking

💭
Doin' cool stuff at BrandMuscle AI
View GitHub Profile
@brianjking
brianjking / responsive-table-example-retina-support.html
Last active September 9, 2015 13:43
Responsive Table Example with Retina Support
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Responsive Table Example</title>
<style>
@import 'http://fonts.googleapis.com/css?family=Open+Sans:300,400,700';
* {
@joseluisq
joseluisq / helpful_queries.md
Last active September 18, 2015 23:24
Some helpful MySQL queries

MySQL helpful queries

Select records from one day ago

In this case registered field is DATETIME type.

SELECT * 
FROM users
WHERE
 `registered` &gt;= CONCAT(SUBDATE(CURDATE(), 1), ' 00:00:00') AND 
@matt-bailey
matt-bailey / frontend-tools.sh
Last active September 28, 2015 22:01
Example frontend tools setup shell script (I use it with Vagrant and a Linux box). Includes Java, Node, PhantomJS, sitespeed.io, Gunt, Bower and Compass
#!/bin/bash
# Vars
java="java"
xsltproc="xsltproc"
node="node"
phantomjs="phantomjs"
grunt="grunt"
bower="bower"
compass="compass"
@stephenscaff
stephenscaff / mqs.scss
Created September 30, 2015 22:04
Media Queries - from common ems to iphones, to ie targeting.
/*----------------------------------------------
--Common MQs Min-Width
----------------------------------------------- */
$mq-xsmall: 22em;
//after iphone
$mq-small: 32em;
//Tablet ish (main break)
$mq-med: 54em;
@stephenscaff
stephenscaff / script-styles.php
Created January 17, 2015 15:59
Scripts and Styles Enqueue for my little wp starter theme, The Jump Off. I actually require_once this file into functions.php from a lib folder to keep things organized.
/*-------------------------------------------*/
/* Register and enqueue scripts and styles
/*-------------------------------------------*/
function jumpoff_scripts_and_styles() {
if ( !is_admin() ) {
//Register Styles
wp_register_style( 'jumpoff_styles',get_template_directory_uri() . '/assets/css/app.min.css', false );
wp_register_style( 'jumpoff_fonts',get_template_directory_uri() . '/assets/css/fonts.min.css', false );
@stephenscaff
stephenscaff / wordpress-sql-url-search-replace
Created January 1, 2015 18:11
Search and replace SQL query for Wordpress migration. In phpMyAdmin, select database, go to SQL tab... click, click boom.
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
@VoidHamlet
VoidHamlet / vim-notes.md
Created September 30, 2015 22:03 — forked from JeffPaine/vim-notes.md
General vim notes.

Vim Notes

  • set list Shows invisible characters.
  • set listchars What invisibile characters should be set to, see :h listchars for complete list.

Key Remapping

  • map creates a key map that works in normal, visual, select and operator pending modes
  • map! creates a key map that works in insert and command-line mode.
@bdusablon
bdusablon / Duce-Genesis-ECP-Simple-CSS
Created January 30, 2015 15:49
Genesis CSS tweak for The Events Calendar Plugin
/*For the calendar/events list page (I just want a white background - it defaults to transparent, and often doesn't look good depending on which child theme you're using. */
#tribe-events-content-wrapper {
background: #fff;
}
/*For the single event page (mess with padding to get the spacing how you want it) */
#tribe-events-pg-template {
background: none repeat scroll 0 0 #fff;
padding: 20px;
margin: 0 auto 30px;
@electricbrick
electricbrick / move-tec-nav
Created July 8, 2015 15:08
Move Events Calendar Navigation
add_action( 'wp_head', 'event_move_nav_genesis' );
function event_move_nav_genesis() {
if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular( 'tribe_events' )) {
//Reposition main nav
add_action( 'genesis_after_header', 'genesis_do_nav' , 10 );
//Reposition secondary nav
add_action( 'genesis_after_header', 'genesis_do_subnav' , 10 );
}
}
@matt-bailey
matt-bailey / gist:3667087
Created September 7, 2012 15:18
Terminal - Secure Copy file
# Copy file from local to remote server (reverse to copy the other way)
scp [filename] [user]@[remote-server]:/tmp/