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
// This is my TEST... | |
describe('angularjs homepage', function() { | |
beforeEach(function() { | |
navigateTo('http://angularjs.org/'); | |
}); | |
it('should greet', function() { | |
// any css selector | |
element('input[ng-model=yourName]').sendKeys('Julie'); |
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
# fetching a single pull request from github | |
# put it into ~/.profile or ~/.bashrc | |
function fetch_pr() { | |
PR=$1 | |
BRANCH=$2 | |
if [ -z $PR ]; then | |
echo "Missing pull request number" | |
return 1 | |
fi |
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 async = require('async'); | |
var fs = require('fs'); | |
var files = []; | |
while(files.length < 100000) { | |
files.push('/some/file' + files.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
{ | |
"auto_complete_commit_on_tab": true, | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/User/Monokai Vojta.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 12.0, | |
"highlight_line": true, | |
"hot_exit": false, | |
"ignored_packages": | |
[ |
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/sh | |
# Shell script to start Sublime | |
# @author Vojta Jina <[email protected]> | |
if [ -z $@ ]; then | |
# no arguments, try to find project | |
# TODO(vojta): traverse up to find projects in parent directories | |
PROJECT=`ls *.sublime-project 2>/dev/null` |
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
<script type="text/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</script> |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
inline: { | |
'index.html': ['tpl/*.html'] | |
} | |
}); | |
grunt.registerMultiTask('inline', 'Inline AngularJS templates into single file.', function() { | |
var SCRIPT = '<script type="text/ng-template" id="<%= id %>"><%= content %></script>\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
var fs = require('fs'); | |
var getLastModified = function(files, done) { | |
var timestamps = new Array(files.length); | |
var pending = files.length; | |
files.forEach(function(file, idx) { | |
fs.stat(file, function(err, stat) { | |
timestamps[idx] = stat.mtime; |
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 app = angular.module('plunker', []); | |
app.controller('MainCtrl', function($scope) { | |
$scope.name = 'World'; | |
}); |
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
// simple dsl just wrapping angular's dsl, just providing higher abstraction | |
angular.scenario.dsl('submitMessage', function() { | |
return function(message) { | |
// these dsl already register futures (add fn into the queue), | |
// so you don't wrap them into addFutureAction | |
input('modelValue').enter(message); | |
element('button.submit').click(); | |
}; | |
}); |