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
protractor example/conf.js --no-jasmineNodeOpts.showColors |
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
For NON DebUbuntu: "Thanks for sharing this - it was a good start in the right direction for me. I noticed that start-stop-daemon appears to be Debian-specific. I modified it to simply execute $XVFB in the background with '&', capture the pid with $!, and echo'ed it to $PIDFILE, then used killproc -p $PIDFILE $XVFB in the stop handler and it is working for me under CentOS that way. If anybody cares to try that, make sure to import /etc/init.d/functions with the '.' at the beginning to get the killproc function." |
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
#!/bin/bash | |
# TODO: http://wiki.debian.org/LSBInitScripts | |
DESC="Selenium server" | |
RUN_AS=root | |
JAVA_BIN=/usr/bin/java | |
SELENIUM_DIR=/etc/selenium | |
PID_FILE="$SELENIUM_DIR/selenium.pid" |
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
var titles = [ | |
{title: 'Mr'}, | |
{title: 'Dr'} | |
]; | |
<select ng-options="t.title for t in titles track by t.title"> |
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
// Fix up prefixing | |
window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
var context = new AudioContext(); | |
function playSound(buffer) { | |
var source = context.createBufferSource(); // creates a sound source | |
source.buffer = buffer; // tell the source which sound to play | |
source.connect(context.destination); // connect the source to the context's destination (the speakers) | |
source.start(0); // play the source now | |
// note: on older systems, may have to use deprecated noteOn(time); |
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
var RhythmSample = { | |
}; | |
RhythmSample.play = function() { | |
function playSound(buffer, time) { | |
var source = context.createBufferSource(); | |
source.buffer = buffer; | |
source.connect(context.destination); | |
if (!source.start) | |
source.start = source.noteOn; |
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
console.log('\033[2J'); | |
//This works on linux. Not sure about windows. | |
// You can "trick" the user using something like this: | |
var lines = process.stdout.getWindowSize()[1]; | |
for(var i = 0; i < lines; i++) { | |
console.log('\r\n'); | |
} |
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
Object.keys(myArray).length |
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
console.log(process.stdout.columns); | |
console.log(process.stdout.rows); | |
console.log(process.stdout.getWindowSize()); |
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
@font-face { | |
font-family: 'MyWebFont'; | |
src: url('webfont.eot'); /* IE9 Compat Modes */ | |
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |
url('webfont.woff') format('woff'), /* Modern Browsers */ | |
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */ | |
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ | |
} |