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
var Interface = { | |
init : function() | |
{ | |
this.append(new Interface.Button('Button 1', function() { | |
alert('Button 1 has been pressed!'); | |
})); | |
this.append(new Interface.Button('Button 2', function() { | |
alert('Button 2 has been pressed!'); |
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
# create an empty branch and pull from an alternate remote | |
$ git symbolic-ref HEAD refs/heads/<new-branch> | |
$ git rm --cached -r . | |
$ git clean -fdx | |
$ git pull <remote> <remote-branch> | |
# switch branch, cherry pick commits and push branch to different remote branch | |
$ git checkout <local-branch> | |
$ git cherry-pick <commit> |
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 | |
/* | |
Plugin Name: Twitter for Wordpress | |
Version: 1.9.7 | |
Plugin URI: http://rick.jinlabs.com/code/twitter | |
Description: Displays your public Twitter messages for all to read. Based on <a href="http://cavemonkey50.com/code/pownce/">Pownce for Wordpress</a> by <a href="http://cavemonkey50.com/">Cavemonkey50</a>. | |
Author: Ricardo González | |
Author URI: http://rick.jinlabs.com/ | |
*/ |
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
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>Ask UK</ShortName> | |
<Description>Ask UK Search</Description> | |
<InputEncoding>UTF-8</InputEncoding> | |
<Url type="text/html" method="GET" template="http://uk.ask.com/web"> | |
<Param name="q" value="{searchTerms}"/> | |
<Param name="search" value="search"/> |
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
// Find a div | |
<div id="footer">([.\s\S]*?)</div> |
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
# Service model | |
require 'nokogiri' | |
require 'open-uri' | |
class Service < ActiveRecord::Base | |
def self.download | |
items = [] |
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
pre { | |
clear:both; | |
margin-top:36px; | |
font-size:1.2em; | |
line-height:1.4; | |
color:#e2e1dc; | |
background-color:#232323; | |
border:3px solid #1c1c1c; | |
padding:15px; | |
overflow:auto; |
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 | |
$photos = array( | |
'one.jpg', | |
'two.jpg', | |
'three.jpg', | |
'four.jpg', | |
'five.jpg' | |
); | |
$photo = $photos[array_rand($photos)]; |
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
body { | |
font:62.5%/1.5 Helvetica, Arial, sans-serif; | |
} | |
/* ---- Clearfix */ | |
.clearfix:after { | |
content:"."; | |
display:block; | |
height:0; |