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 fundamental = 440, | |
harmonics = [1, 3, 5, 7, 9, 13, 15], // Clarinets only have odd partials. | |
baseHarmonicDef = { | |
ugen: "flock.ugen.saw", | |
freq: 440, | |
mul: { | |
ugen: "flock.ugen.envGen", | |
envelope: { | |
type: "flock.envelope.adsr", | |
attack: 0.1, |
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
# spec/support/poltergeist_screenshot_helper.rb | |
module PoltergeistScreenshotHelper | |
# FROM http://blog.jerodsanto.net/2012/12/capybara-and-poltergeist-snap/ | |
def snap!(options={}) | |
path = options.fetch :path, "~/.Trash" | |
file = options.fetch :file, "#{Time.now.to_i}.png" | |
full = options.fetch :full, true | |
path = File.expand_path path |
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
// Disable scroll zooming and bind back the click event | |
var onMapMouseleaveHandler = function (event) { | |
var that = $(this); | |
that.on('click', onMapClickHandler); | |
that.off('mouseleave', onMapMouseleaveHandler); | |
that.find('iframe').css("pointer-events", "none"); | |
// pointer-events needs to be added as a style on the iframe | |
} |
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
function listeners () { | |
demo.jqContainer.mousedown(mouseDown); | |
demo.jqContainer.mouseup(mouseUp); | |
demo.jqContainer.mousemove(marqueeSelect); | |
$(document).mousemove(resetMarquee); | |
} | |
function resetMarquee () { | |
mouseup = true; | |
mousedown = false; |
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
web: ./node_modules/.bin/coffee app.coffee |
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
function rightWay(obj) { | |
for (var key in obj) { | |
// Ignore properties that are inherited. | |
if (!obj.hasOwnProperty(key)) { | |
continue; | |
} | |
console.log(key); | |
} | |
} |
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
menuCommandString,UI MenuString zh_CN | |
------------------------------------- | |
new,新建 | |
newFromTemplate,从模板新建 | |
open,打开 | |
saveacopy,存储副本 | |
Adobe AI Save For Web,存储为 Web 所用格式(W) | |
Adobe AI Save Selected Slices,存储选中的切片 | |
revert,恢复 | |
AI Place,置入(L) |
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
function has3d(){ | |
if (!window.getComputedStyle) { | |
return false; | |
} | |
var el = document.createElement('p'), | |
has3d, | |
transforms = { | |
'webkitTransform':'-webkit-transform', | |
'OTransform':'-o-transform', |
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
// Import Handlebars runtime lib | |
const Handlebars = require('handlebars/runtime'); | |
const register = require('handlebars-form-helpers').register; | |
const { registerHandlebarHelpers } = require('../../some/other/place'); | |
// Register extra helpers | |
register(Handlebars); | |
registerHandlebarHelpers(Handlebars); |
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
# Create a new self signed HTTPS Certificate for IIS Express | |
# Crafted with all organic, GMO, gluten free ingreditations | |
# with an artisinal SAN to make Chrome 58 onwards happy. | |
# | |
# See https://bugs.chromium.org/p/chromium/issues/detail?id=308330 | |
# | |
# Run this at an administrative PowerShell prompt. | |
# | |
# You will be prompted to trust a new certificate via a windows dialog. | |
# Click yes otherwise Visual Studio will not be able to determine your |
OlderNewer