Skip to content

Instantly share code, notes, and snippets.

View StanAngeloff's full-sized avatar

Stan Angeloff StanAngeloff

View GitHub Profile
; AutoHotkey script, download from:
; http://www.autohotkey.com/
; NOTE: Save this file with Windows line endings i.e. \r\n
;
cmd_line := "C:\bin\cygwin\bin\mintty.exe /bin/zsh --login"
wnd_class := "ahk_class mintty"
#c::
StringScanner = null
( ->
setState = (target, matches, values) ->
target.head = values?.head ? target.head
target.last = values?.last ? target.last
target.captures = matches.slice 1
target.match = matches[0]
class StringScanner
constructor: (source) ->
class A
constructor: -> alert 'A'
A::constructor = -> alert 'B'
new A
var Account, Model;
var __extends = function(child, parent) {
var ctor = function(){};
ctor.prototype = parent.prototype;
child.prototype = new ctor();
child.prototype.constructor = child;
if (typeof parent.extended === "function") parent.extended(child);
child.__superClass__ = parent.prototype;
};
Model = function() {};
property = (instance, name) ->
instance[name] =
get: -> instance["_#{name}"]
set: (value) -> instance["_#{name}"] = value
get = (instance, route, block) ->
instance.routes[route] = type: 'get', block: block
put = (instance, route, block) ->
instance.routes[route] = type: 'put', block: block
require 'b'
this_ is_ file_ a
diff --git a/src/command.coffee b/src/command.coffee
index 3056894..beeb09c 100644
--- a/src/command.coffee
+++ b/src/command.coffee
@@ -96,7 +96,7 @@ compileScript = (source, code, base) ->
o = options
codeOpts = compileOptions source
if o.require
- require fs.realpathSync file for file in o.require
+ require(if helpers.starts(file, '.') then fs.realpathSync(file) else file) for file in o.require
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/chrome_switches.h"
#include "base/base_switches.h"
#include "base/command_line.h"
namespace switches {
(function() {
for (var child, i = 0, length = document.childNodes.length; i < length && (child = document.childNodes[i]); i ++) {
if (child.nodeType === 7) {
if (child.nodeValue.indexOf('aero') > 0) {
child.nodeValue = 'discard="discard"';
document.removeChild(child);
}
}
}
for i in [0..10]
switch i
when 5
( -> break)()
console.log i