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
0xfDaD8863fE73bC3E22343B95922B7247f612569b |
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
yarn init | |
yarn add typescript jest ts-jest | |
tsc --init | |
typings install dt~jasmine --save --global | |
jest |
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
# project init | |
mkdir project-name | |
cd project-name | |
touch README.md | |
mkdir src dist | |
echo "console.log('hello world')" > src/entry.js | |
echo '<script src="bundle.js"></script>' > dist/index.html |
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
Athlete = require './athlete' | |
module.exports = class AthleteList | |
@fromArray: (data, entryClass = Athlete) -> new @ data, entryClass | |
constructor: (data, @entryClass = Athlete) -> @updateFromArray data | |
updateFromArray: (data) -> | |
@members ?= {} |
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
ps = angular.element('ui-view').scope() | |
ms = angular.element('.modal-window > *:eq(0)').scope() | |
s = ms || ps | |
c = s.lCtrl || s.mcCtrl || s.luCtrl || s.ipCtrl || s.viewContestCtrl || s.myLineupsCtrl || s.llCtrl || s.aCtrl | |
vm = c.vm | |
// optional: | |
console.clear() | |
console.log('vm', vm) | |
if (t = vm.contests || vm.athletes) console.table(t) |
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
<!-- Changese on line: 899 and line 1176 --> | |
<!-- ?<=\{\{)(.+)(?=\}\}) matches inside {{}} binding --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>jade</string> | |
</array> |
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
characters = | |
'á': 'a' | |
'é': 'e' | |
'í': 'i' | |
'ó': 'o' | |
'ñ': 'n' | |
reg = new RegExp '[' + _.keys(x).join("") + ']', 'g' | |
str.replace reg , (chr) -> | |
return characters[chr]; |
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
Commands: | |
openssl genrsa -des3 -out server.key 1024 | |
openssl req -new -key server.key -out server.csr | |
>>>>>Common Name (eg, YOUR name) []:localhost | |
openssl x509 -req -days 1024 -in server.csr -signkey server.key -out server.crt | |
Express: | |
privateKey = fs.readFileSync('/Users/jake/webclient/server.key').toString(); | |
certificate = fs.readFileSync('/Users/jake/webclient/server.crt').toString(); |
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
#uses document because document will be topmost level in bubbling | |
$(document).on "touchmove", (e) -> | |
e.preventDefault() | |
#uses body because jquery on events are called off of the element they are | |
#added to, so bubbling would not work if we used document instead. | |
$("body").on "touchstart", ".mobile-scrolling", (e) -> | |
if e.currentTarget.scrollTop is 0 | |
e.currentTarget.scrollTop = 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
# force update npm globally | |
npm update -gf | |
# fix brew symlinks | |
brew unlink node && brew link --overwrite node | |
# give current user permissions to npm config and install global install directory | |
sudo chown -R `whoami` /usr/local/lib/node_modules | |
sudo chown -R `whoami` ~/.npm |
NewerOlder