Skip to content

Instantly share code, notes, and snippets.

View jchck's full-sized avatar

justin chick jchck

  • Brooklyn, NY
View GitHub Profile
@jchck
jchck / json
Created March 27, 2019 13:59
VS Code Settings
{
"workbench.colorTheme": "Cobalt2",
"editor.fontSize": 17,
"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.wordWrapColumn": 90,
"workbench.statusBar.feedback.visible": false,
var map;
$(document).ready(function(){
map = new GMaps({
div: '#map-canvas',
zoom: 5,
lat: 38.636206,
lng: -90.246758,
scrollwheel: false,
panControl: false,
streetViewControl: false,
{
"name": "roots",
"version": "7.0.0",
"author": "Ben Word <ben@benword.com>",
"homepage": "http://roots.io",
"repository": {
"type": "git",
"url": "git://github.com/roots/roots.git"
},
"bugs": {
/**
* @link http://cfxdesign.com/remove-unused-css-from-wordpress-automatically-with-grunt
*/
function show_sitemap() {
if(WP_ENV === 'development' && isset($_GET['show_sitemap'])) {
$the_query = new WP_Query(array('post_type' => 'any', 'posts_per_page' => '-1', 'post_status' => 'publish'));
$urls = array();
while($the_query->have_posts()) {
$the_query->the_post();
$urls[] = get_permalink();
@jchck
jchck / gruntfile.js
Created June 16, 2015 17:02
Gruntfile.js with Uncss
'use strict';
module.exports = function(grunt) {
// Load all tasks
require('load-grunt-tasks')(grunt);
// Show elapsed time
require('time-grunt')(grunt);
var jsFileList = [
'assets/js/plugins/bootstrap/transition.js',
//'assets/js/plugins/bootstrap/alert.js',
@jchck
jchck / gist:662fcee4fb031f920121
Created December 7, 2014 00:09
SQL Query to Add WP User
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('21', 'username_here', MD5('password_here'), 'Justin Chick', 'hey@justinchick.com', 'http://justinchick.com/', '2014-12-06 00:00:00', '', '0', 'Justin Chick');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '21', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '21', 'wp_user_level', '10');
@jchck
jchck / gist:48521c7592e2fbd6d6f4
Last active August 29, 2015 14:10
wp-config.php database settings
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');
/** MySQL database username */
define('DB_USER', 'username_here');
/** MySQL database password */
define('DB_PASSWORD', 'password_here');
// init hoverdir.js
$(function() {
$(' #work_thumbnail_container > li ').each( function() { $(this).hoverdir(); } );
});
<?php echo get_template_directory_uri(); ?>/folder1/folder2/picture.png
@jchck
jchck / wp-template-url.php
Created October 23, 2012 20:55
Get WP template url
<?php echo get_template_directory_uri(); ?>