View gist:ff1747273a456aa55c57fa6adb55f52b
emotion :+1: :-1: :clap: :heart: :sparkles: :v: :zzz:
icon :new: :ok: :cool: :vs: :tm: :warning: :wheelchair: :zap: :art: :bomb: :bulb: :key: :lock: :memo: :mag:
item :book: :gift: :moneybag: :mega: :scissors: :hammer:
device :computer: :iphone: :calling: :email:
human :cop: :runner: :feet: :fist: :punch: :lipstick: :tophat:
food :beer: :cake: :smoking:
behicle :airplane: :bike: :bus: :ski: :taxi: :train:
animal :bear: :fish: :octocat:
nature :fire: :leaves: :star: :sunny:
View signup.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js" ></script>
<title>AJAX Signup</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
View mysql-init.sh
#! /usr/bin/env bash
PASS="rajurajusendy"
mysql -u root -p <<MYSQL_SCRIPT
CREATE DATABASE $1;
CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS';
GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
View README.md

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
View _debug.scss
/* ----------------------------------------------------------------------------
* DEBUG CSS for XDEBUG
* ------------------------------------------------------------------------- */
pre.xdebug-var-dump {
display: table;
width: 100%;
padding: 5rem;
margin: 5rem;
font: 2.5rem/2.5 'Operator Mono';
}
View xdebug_sublime.md
  • Check phpinfo() if xdebug is on.
  • + + F9 to set a breakpoint.
  • + + F6 to step over.
  • + + P to set watch expression.
  • + fn + f8 set/remove a breakpoint.
  • + + fn + f9 start debugging.
  • + + fn + f6 step over. --ignore
  • + + fn + f7 step into. --check
  • + + fn + f8 step out. --get_back
View list_apps.sh
#!/bin/sh
(
for i in /Applications/*.app
do
Printf "$i \t" | cut -c15-1000
/usr/libexec/plistbuddy -c Print:CFBundleShortVersionString: "$i"/Contents/info.plist
done
for u in /Applications/Utilities/*.app
do
View wpcc.md
  • Clone the official Git repo inside a folder called WPC
  • There should be a gruntfile.js in the WPC's root
  • There should also be src and build folders
  • src is where you make changes, build is where grunt will build the changes you made!
  • With DesktopServer install a local WP inside the WPC folder and call it WPCore.dev
  • Move the wp-config.php file from WPCore.dev folder to the parent WPC folder
  • Open gruntfile.js and change the build to WPCore.dev i.e. BUILD_DIR = 'wpcore.dev/',
  • Now, via command line go to src folder and run the command 'svn up .' (without quotes with the space and period at the end) — this will update the trunk to the latest code
  • Make any changes in the src folder
  • Then cd to WPC folder and run grunt
View disable_mac_animations.sh
# Open the Terminal app and run any of the below commands.
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
# float 0 doesn't work
defaults write -g NSWindowResizeTime -float 0.001
View post.php
<!-- Add this anywhere in the page. It assumes your content is inside an <article> tag. -->
<a class="floating-twitter-share-link" href="#" title="Share this" target="_blank">
<i class="fa fa-twitter floating-twitter-share"></i>
</a>