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 | |
| # just call with ./kill_test_servers.sh buster-server|selenium|phantom | |
| function get_buster_server_pid(){ | |
| echo `ps aux|grep buster-server|grep node|awk '{ print $2 }'` | |
| } | |
| function get_selenium_server_pid(){ | |
| echo `ps aux|grep selenium|grep java|awk '{ print $2 }'` | |
| } |
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 https://registry.npmjs.org/promised-io/0.3.2 | |
| curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: | |
| error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed | |
| More details here: http://curl.haxx.se/docs/sslcerts.html | |
| curl performs SSL certificate verification by default, using a "bundle" | |
| of Certificate Authority (CA) public keys (CA certs). If the default | |
| bundle file isn't adequate, you can specify an alternate file | |
| using the --cacert option. | |
| If this HTTPS server uses a certificate signed by a CA represented in |
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
| Para quartos: | |
| http://www.gumtree.com/ | |
| http://uk.easyroommate.com/ | |
| http://www.spareroom.co.uk/ | |
| Cuidado com os scams no gumtree, ha bastantes. | |
| Para casas: | |
| http://rightmove.co.uk | |
| http://www.moveflat.com/ |
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
| // ==UserScript== | |
| // @name Hootsuite promoted tweets never more | |
| // @namespace http://localhost | |
| // @description Remove hootsuite promoted tweets | |
| // @include https://hootsuite.com/dashboard* | |
| // @version 1 | |
| // ==/UserScript== | |
| function addCss(cssString) { | |
| var head = document.getElementsByTagName('head')[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
| uglify(){ | |
| ./node_modules/uglify-js/bin/uglifyjs $1 > $2 | |
| if [ $? != 0 ] ; then | |
| exit 1 | |
| fi | |
| } | |
| build_js(){ | |
| ./node_modules/requirejs/bin/r.js -o $1 $rjsopt | |
| es=$? |
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 Point(x, y) { | |
| this.x = x; | |
| this.y = y; | |
| } | |
| Point.prototype.addZ = function(val){ | |
| this.z = val; | |
| }; | |
| var p1 = new Point(11, 22); |
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 func(firstarg){ | |
| console.log(firstarg); // on Chrome it's defined, on Android 2.3.6 browser it's defined | |
| var args = Array.prototype.splice.call(arguments, 0, arguments.length); | |
| console.log(arguments[0]); // on Chrome it's undefined, on Android 2.3.6 browser it's undefined | |
| console.log(firstarg); // on Chrome it's defined, on Android 2.3.6 browser it's *undefined* | |
| } | |
| func("hello"); |
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 getProperty(){ | |
| for(var i in obj){ | |
| if(obj.hasOwnProperty(i)){ | |
| return i; | |
| } | |
| } | |
| } |
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
| define(['dependency'], function(dependency){ | |
| buster.testCase('some test', { | |
| setUp: function(done){ | |
| var self = this; | |
| this.someStub = sinon.stub(dependency, 'method'); | |
| require(['moduleToTest'], function(ModuleToTest){ | |
| self.instance = new ModuleToTest(); | |
| }); |
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
| Mac OSX keyboard layout switching is a pain. | |
| Using a keyboard layout different than the one actually printed on | |
| your keys is also weird. The following keyboard shortcuts allow you | |
| to create the various diacritics used in languages like Portuguese | |
| on the British/US layout of a Mac keyboard. | |
| Alt+e -> ´ Examples: é ó á | |
| Alt+i -> ^ Examples: â ê | |
| Alt+c -> ç |