This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'video', | |
attributeBindings: [ | |
'autoplay', | |
'muted', | |
'height', | |
'width', | |
'poster', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const { | |
Component, | |
computed, | |
get, | |
guidFor | |
} = Ember; | |
export default Component.extend({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Example usage: | |
$template = new Medium_Template( 'Hi, I am {{name|html}}.' ); | |
echo $template->compile( array( 'name' => '<b>Evan</b>' ) ); | |
// Hi, I am <b>Evan</b>. | |
echo $template->compile( array( 'name' => 'someone else' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Thing { | |
private $name = "Evan"; | |
} | |
$thing = new Thing(); | |
class ExtendedThing extends Thing { | |
function say_name() { | |
if (isset($this->name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
printenv | grep "^\([[:alnum:]]\|[[:punct:]]\)\+=" | sed 's/=.*$//g' | while read var; do | |
echo "$var=$(printenv $var)\0" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Go to the repo | |
echo "Switching to $1" | |
cd $1 | |
# Only publish from master | |
if git branch | ack "\* master" >/dev/null | |
then | |
echo "You're on master, good to go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :build do | |
desc "Name static files by version" | |
task :version, :roles => :app do | |
find_static_files = "find #{current_release} -name '*.js' -o -name '*.css'" | |
capture(find_static_files).split("\n").each do |file| | |
# Get paths | |
full_path = file.chomp | |
relative_path = full_path.clone | |
relative_path["#{current_release}/"] = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.4.0 | |
(function() { | |
(function($) { | |
return $(function() { | |
var db; | |
db = window.wpDebugBar; | |
return $(document).keydown(function(event) { | |
var _ref, _ref1; | |
if (((_ref = db.body) != null ? _ref.hasClass('debug-bar-visible') : void 0) && 27 === event.keyCode) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Delete core directories | |
rm -rf wp-includes/ wp-admin/ | |
# Delete core files in the root | |
ls -l | ack "^[^d]" | ack "\swp[^\s]*$" | awk '{print $9}' | xargs rm | |
# Recover wp-config | |
git checkout wp-config.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alias ST2's command line tool for a shorter (easier-to-remember) name | |
alias st="/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl" | |
# Search for an open Sublime Text to a function definition | |
function fx() { | |
ack "function &?$1\(" | awk {'print $1'} | sed 's/:$//g' | xargs st | |
} | |
# Example usage from the root of a WordPress repository |