This file contains hidden or 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
| __extends = function(child, parent) { | |
| for (var key in parent) { | |
| if (__hasProp.call(parent, key)) child[key] = parent[key]; | |
| } | |
| function ctor() { | |
| // why set the prototype's constructor to child? | |
| this.constructor = child; | |
| } | |
| ctor.prototype = parent.prototype; | |
| child.prototype = new ctor; |
This file contains hidden or 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
| require "active_support/callbacks" | |
| class Foo | |
| include ActiveSupport::Callbacks | |
| define_callbacks :foo | |
| set_callback :foo, :around, :around_1 | |
| set_callback :foo, :before, :before_1 | |
| set_callback :foo, :after, :after_1 |
This file contains hidden or 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
| # In Ruby, you can always pass a block to a method call. | |
| def foo | |
| end | |
| # Call foo with a block, but foo just ignores the block | |
| foo { puts "doesn't call the block" } | |
| # foo can capture the block |
This file contains hidden or 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
| [ | |
| { | |
| "id": "1978774765", | |
| "type": "PushEvent", | |
| "actor": { | |
| "id": 382747, | |
| "login": "andrepl", | |
| "gravatar_id": "411d2b4791a8de51f98666e93e9f1fde", | |
| "url": "https://api.github.com/users/andrepl", | |
| "avatar_url": "https://gravatar.com/avatar/411d2b4791a8de51f98666e93e9f1fde?d=https%3A%2F%2Fa248.e.akamai.net%2Fassets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png&r=x" |
This file contains hidden or 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
| pkg/syscall/zsyscall_darwin_386.go:272: r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) | |
| pkg/syscall/zsyscall_darwin_386.go:983: r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) | |
| pkg/syscall/zsyscall_darwin_386.go:1328: r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) | |
| pkg/syscall/zsyscall_darwin_amd64.go:272: r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) | |
| pkg/syscall/zsyscall_darwin_amd64.go:1328: r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) | |
| pkg/syscall/zsyscall_dragonfly_386.go:262: r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) | |
| pkg/syscall/zsyscall_dragonfly_386.go:973: r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) | |
| pkg/syscall/zsyscall_dragonfly_amd64.go:262: r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) | |
| pkg/syscall/zsyscall_freebsd_386.go:262: r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) | |
| pkg/syscall/zsyscall_freebsd_386.go:973: r0, r1, e1 := |
This file contains hidden or 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
| /** | |
| * Allows extraction of a minified key. Let's the build system minify keys | |
| * without loosing the ability to dynamically use key strings as values | |
| * themselves. Pass in an object with a single key/val pair and it will return | |
| * you the string key of that single record. Suppose you want to grab the | |
| * value for a key 'className' inside of an object. Key/val minification may | |
| * have aliased that key to be 'xa12'. keyOf({className: null}) will return | |
| * 'xa12' in that case. Resolve keys you want to use once at startup time, then | |
| * reuse those resolutions. | |
| */ |
This file contains hidden or 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
| # Creating and Using Regexps | |
| You're reading this because you want to use regular expressions when you code. | |
| So this is probably a good time to tell you how to represent and use regular | |
| expressions in your programs. | |
| The good news is that most languages make it easy to use regular expressions. | |
| The bad news is that each language does it differently. | |
| {{#margin id="babel-tower"}} | |
| {{img "images/iStock_000005187601Large-babel.png"}} |
This file contains hidden or 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
| 00000000000000000000000000000000000000000000000000000000000000000000000000000000 | |
| 11111111111111111111111111111111111111111111111111111111111111111111111111111111 | |
| 22222222222222222222222222222222222222222222222222222222222222222222222222222222 | |
| 33333333333333333333333333333333333333333333333333333333333333333333333333333333 | |
| 44444444444444444444444444444444444444444444444444444444444444444444444444444444 | |
| 55555555555555555555555555555555555555555555555555555555555555555555555555555555 | |
| 66666666666666666666666666666666666666666666666666666666666666666666666666666666 | |
| 77777777777777777777777777777777777777777777777777777777777777777777777777777777 | |
| 88888888888888888888888888888888888888888888888888888888888888888888888888888888 | |
| 99999999999999999999999999999999999999999999999999999999999999999999999999999999 |
This file contains hidden or 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
| <?xml version="1.0"?> <?xml version="1.0"?> | |
| <!-- greeting.xsl --> <!-- greeting.xsl --> | |
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/19 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/19 | |
| <xsl:output method="html"/> | xmlns:redirect="http://xml.apache.org/xalan/redirect" | |
| > extension-element-prefixes="redirect" | |
| > xmlns:xalan="http://xml.apache.org/xslt" | |
| > > | |
| > <xsl:output method="html" indent="yes" xalan:indent-amount= | |
| <xsl:template match="/"> <xsl:template match="/"> |
This file contains hidden or 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
| deb http://archive.ubuntu.com/ubuntu precise main | |
| deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted | |
| deb http://us.archive.ubuntu.com/ubuntu/ precise universe | |
| deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe | |
| deb http://security.ubuntu.com/ubuntu precise-security main restricted | |
| deb http://security.ubuntu.com/ubuntu precise-security universe |