Skip to content

Instantly share code, notes, and snippets.

View robinbastien's full-sized avatar
Just a developer in a quarantined world

Robin Bastien robinbastien

Just a developer in a quarantined world
View GitHub Profile
@robinbastien
robinbastien / SlitSlider Initiation
Created January 25, 2013 05:49
SlitSlider Initiation
$(function() {
var Page = (function() {
var $navArrows = $( '#nav-arrows' ),
$nav = $( '#nav-dots > span' ),
slitslider = $( '#slider' ).slitslider( {
onBeforeChange : function( slide, pos ) {
$nav.removeClass( 'nav-dot-current' );
@robinbastien
robinbastien / gist:5440381
Created April 23, 2013 02:33
OSX Dock Commands
#Flatten the Dock
defaults write com.apple.dock no-glass -boolean YES
#Add a blank space to the dock
defaults write com.apple.dock persistent-apps -array-add '{ "tile-type" = "spacer-tile"; }'
#Refresh the Dock after adding yr changes
killall Dock
@robinbastien
robinbastien / OSX Dock Commands
Created April 23, 2013 02:36
Commands to customize the OSX dock
#Add a Spacer
defaults write com.apple.dock persistent-apps -array-add ‘{ “tile-type” = “spacer-tile”; }’
#Flatten Dock
defaults write com.apple.dock no-glass -boolean YES
#Restart Dock
killall Dock
Redirect 301 /foo.html /bar.html
Redirect 301 /about.html /about
Redirect 301 /support /help
function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
// unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); // WordPress Blog
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); // Other WordPress News
/*!
* equalHeights jQuery Plugin
*/
(function($){
$.fn.equalHeights = function() {
var tallest = 0,
current = 0;
this.each(function(){
current = $(this).height();
if(current > tallest) {
mysql -u root -p
mysql> create user blog@localhost identified by 'password';
mysql> create database blog;
mysql> grant all on blog.* to blog@localhost;
mysql> exit;
@robinbastien
robinbastien / pi.twitter_embed.php
Created November 8, 2013 10:27
Statamic - Store API Data to Cache
<?php
class Plugin_twitter_embed extends Plugin {
var $meta = array(
'name' => 'Twitter Embed',
'version' => '1.0',
'author' => 'Andrea DeMers',
'author_url' => 'http://andreademers.com'
);
#Sitespeed.io is an open source tool that helps you analyze your website speed and performance based on performance best practices and metrics. Uses Homebrew
# Install
$ brew install sitespeedio/sitespeedio/sitespeed.io
$ sitespeed.io -h
@robinbastien
robinbastien / reset-sample.css
Created March 10, 2014 13:41
A sample of some common HTML elements to override a reset stylesheet.
ul, ol { margin-bottom: 20px; }
ul { list-style: none outside; }
ol { list-style: decimal; }
blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px;}
em { font-style: italic; }
strong { font-weight: bold; }
small { font-size: 80%; }