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
## Do this before doing bundle install | |
# Make sure you have Xcode installed with command line utilities. | |
# Install Home Brew (if you already have it installed update it): | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update --system | |
brew update |
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
<html> | |
<head> | |
<title>TabIndex Example - 1</title> | |
</head> | |
<body> | |
This will jump from tab 1 to tab 2. | |
<br /> | |
<label>Tab 1</label> | |
<input tabindex="1" type="text" /> | |
<br /> |
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
<html> | |
<head> | |
<title>TabIndex Example - 0</title> | |
</head> | |
<body> | |
This will jump from tab 0 to the address bar. | |
<br /> | |
<label>Tab 0</label> | |
<input tabindex="0" type="text" /> | |
<br /> |
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
$(window).on 'ready page:load', -> | |
# Your code |
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
# Change to a directory given a full or partial name | |
# You don't have to wrap directory names in quotes either | |
function chd() { | |
friendlyChgDirOptions | |
if [ -n "$1" ]; then | |
if [ -n "`ls "$@"* 2>/dev/null`" ]; then | |
cd "$1"* | |
else | |
echo "-bash: chd: "$1": No directory found from partial 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
shopt -s nocaseglob |
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 ruby | |
require 'rss' | |
require 'open-uri' | |
require 'net/http' | |
# Your subscription ID | |
sub_id = "xxx" | |
url = "http://railscasts.com/subscriptions/#{sub_id}/episodes.rss" | |
puts "Reading RSS" |
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
<!-- index.html --> | |
<html> | |
<head> | |
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> | |
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> | |
<META HTTP-EQUIV="EXPIRES" CONTENT="0"> | |
<META HTTP-EQUIV="REFRESH" CONTENT="0;https://mywebsite.com/ab.007/story.html"> | |
<script type="text/javascript"> | |
window.location = "https://mywebsite.com/ab.007/story.html" | |
</script> |
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 ruby | |
#Thread.abort_on_exception = true | |
require 'fiber' | |
require 'benchmark' | |
class FiberRing | |
attr_reader :id | |
def initialize(id) | |
@id = id |
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
CAIRO_VERSION_STRING = CAIRO_VERSION_MAJOR.CAIRO_VERSION_MINOR.CAIRO_VERSION_MICRO | |
attach_function :cairo_version, [ ], :int | |
attach_function :cairo_version_string, [ ], :string | |
class CairoMatrix < FFI::Struct | |
layout( | |
:xx, :double, | |
:yx, :double, | |
:xy, :double, | |
:yy, :double, | |
:x0, :double, |
NewerOlder