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
| curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' |
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 | |
| # this file is ./git/hooks/pre-push | |
| protected_branch='master' | |
| current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
| if [ $protected_branch = $current_branch ] | |
| then | |
| echo "y u do this? (You can not push to master)" | |
| exit 1; |
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
| // file: /server/proxies/products.js | |
| // instead of a mock, i always want to hit the API for this endpoint... | |
| module.exports = function(app) { | |
| var url = require('url'); | |
| var proxy = require('proxy-middleware'); | |
| app.post("/api/products/*", proxy(url.parse('http://foo.bar.com/api/products'))); | |
| }; |
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
| :s/#each\s\v\zs(<\w*>)\sin\s(<(\w|.)*)>/\2 as |\1|/ |
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
| yum install -y jenkins | |
| yum install -y git | |
| yum install -y nodejs | |
| yum install -y npm | |
| echo "Fix Node JS naming issue with a symlink" | |
| ln -s /usr/bin/nodejs /usr/bin/node | |
| #download jenkins CLI | |
| wget http://localhost:6060/jnlpJars/jenkins-cli.jar |
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
| <table border="0" cellpadding="0" cellspacing="0" class="ez-t-account"> | |
| <thead> | |
| <th colspan="2">A T-Account</th> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>$300<br>$1,200</td> | |
| <td>$1,500</td> | |
| </tr> | |
| </tbody> |
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
| // taken from http://ng.malsup.com/#!/counting-watchers | |
| (function countAngularWatchers(angular) { | |
| var i, data, scope, | |
| count = 0, | |
| all = document.all, | |
| len = all.length, | |
| test = {}; | |
| var mostWatchers = 0; |
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
| function numToWords (num) { | |
| var a = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen ']; | |
| var b = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety']; | |
| if ((num = num.toString()).length > 9) { | |
| return 'num overflow'; | |
| } | |
| var n = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/); | |
| if (!n) return; | |
| var str = ''; |
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
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| classNames: ['ember-component'] | |
| }); |
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
| .sr-only { | |
| position: absolute; | |
| width: 1px; | |
| height: 1px; | |
| padding: 0; | |
| margin: -1px; | |
| overflow: hidden; | |
| clip: rect(0,0,0,0); | |
| border: 0; | |
| } |