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
// Usage: bind(event).to(element).for(selector).as(handler) | |
// e.g. bind("click").to(document.documentElement).for("a").as(e => console.log(e.target.href)); | |
function bind(event) { | |
return { | |
to: function(element) { | |
element = isString(element) ? document.getElementById(element) : element; | |
return { | |
as: function(handler) { |
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
declare @name varchar(100) | |
declare @table varchar(100) | |
-- Drop all foreign key constraints: this goes through alter table | |
declare c cursor for | |
select a.name as [constraint], b.name as [table] from dbo.sysobjects a | |
inner join dbo.sysobjects b on a.parent_obj = b.id | |
where a.xtype='F' and b.xtype='U' | |
open c |
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 child_process = require('child_process'); | |
function install(modules, callback) { | |
if (modules.length == 0) { | |
if (callback) callback(null); | |
return; | |
} | |
var module = modules.shift(); | |
child_process.exec( | |
'npm install ' + module, |
OlderNewer