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
module GlobalConstant | |
AUTORESOLVE = [] | |
AUTOIMPORT = [] | |
def self.install | |
Object.instance_eval do | |
class << self | |
alias old_const_missing const_missing | |
def const_missing constant | |
to_check = GlobalConstant::AUTORESOLVE.keep_if { |m| m.singleton_class == self } + GlobalConstant::AUTOIMPORT |
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
require "sinatra" | |
require "slim" | |
require "coffee-script" | |
require "sass" | |
require "eventmachine" | |
get "/" do | |
slim :html | |
end |
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 | |
thin start -p 3000 -R test.ru |
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
{ | |
ip4_expression: /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, | |
ip6_expression: /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-F |
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
global.MyModule = require "MyModule" | |
PATH = "./" # Define your Path | |
require("#{PATH}/node_modules/coffee-script/lib/coffee-script/command.js").run() |
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
<a href="javascript:(function(){ms=document.createElement('SCRIPT');ms.type='text/javascript';ms.src='http://mysite.com/script.js?';document.getElementsByTagName('head')[0].appendChild(ms); | |
})();">Drag & Drop to your Bookmark (or copy / paste link)</a> | |
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
spawn = require('child_process').spawn | |
bash = spawn "bash", ["-i"] | |
bash.stdin.write "export PS1=wrapped:$PS1\n" | |
process.stdin.pipe(bash.stdin) | |
process.stdin.resume() | |
require('tty').setRawMode(true) | |
bash.stderr.pipe(process.stderr) | |
bash.stdout.pipe(process.stdout) |
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
StackObjError = require "stack_trace_with_line_from_code" | |
first_func = -> | |
second_func = -> | |
console.log JSON.stringify(new StackObjError().stack) | |
second_func() | |
first_func() |
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
fs = require "fs" | |
es = require('event-stream') | |
zipstream = require("zipstream") | |
app = require("express")() | |
files = ["rt_p2p_server.coffee", "rt_p2p_server.screen"] | |
addFile = (files) -> | |
unless files.length | |
zip.finalize -> |
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
<element name="cs-component"> | |
<template> | |
I am a {{ language }} component | |
</template> | |
<script type="text/coffeescript"> | |
Polymer.register @, | |
language: "CoffeeScript" | |
ready: -> | |
console.log "READY", @ | |
</script> |
OlderNewer