$ npm config set proxy http://localhost:3128
$ npm config set https-proxy http://localhost:3128
This config is great for SquidMan app.
//Install Macports. | |
//Install aircrack-ng: | |
sudo port install aircrack-ng | |
//Install the latest Xcode, with the Command Line Tools. | |
//Create the following symlink: | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
//Figure out which channel you need to sniff: | |
sudo airport -s | |
sudo airport en1 sniff [CHANNEL] |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HMAC-SHA256 Example</title> | |
</head> | |
<body> | |
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script> | |
<script> | |
var sharedSecret, query, signature, hmac, xhr; |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
$ npm config set proxy http://localhost:3128
$ npm config set https-proxy http://localhost:3128
This config is great for SquidMan app.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
var n | |
//var melody = [ 0, -1, -3, -5,-7,-8,-10,-12 ] // reverse DoSiLaSoFaMiReDo | |
//var melody = [ 0, 2, 4, 5,7,9,11,12 ] //DoReMiFaSoLaSi | |
var melody =[ | |
34, 4, n, 4, n, 0, 4, n, 7, n, n, n, -5, n, n, n, | |
0,n,n,-5,n,n,-8,n,n,-3,n,-1,n,-2,-3,n,-5,4,n,7,9,n,5,7,n,4,n,0,2,-1,n,n,n, | |
0,n,n,-5,n,n,-8,n,n,-3,n,-1,n,-2,-3,n,-5,4,n,7,9,n,5,7,n,4,n,0,2,-1,n,n,n, | |
n,-5,7,6,5,3,n,4,n,-5,-3,0,0,-3,0,2,n,n,n,7,6,5,3,n,4,n,n,12,n,12,12,n,n,n,n, | |
n,n,7,6,5,3,n,4,n,-5,-3,0,n,-3,0,2,n,n,3,n,n,2,n,n,0,n,n,-5,-5,n,-12,n, | |
0,0,n,0,n,0,2,n,4,0,n,-3,-5,n,n,n, |
'use strict'; | |
/*****************NATIVE forEACH*********************/ | |
Array.prototype.myEach = function(callback) { | |
for (var i = 0; i < this.length; i++) | |
callback(this[i], i, this); | |
}; | |
//tests |
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5
-- @desc: Return the sum of all scores in a sorted set | |
-- @usage: redis-cli eval "$(cat ZSUM.lua)" N <zset1> <zset2> ... <zsetN> | |
-- @return: integer sum | |
local function ZSUM(keys) | |
local sum = 0 | |
local function sumKeyScores(key) |
<label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span> | |
<select id="country" name="country" class="form-control"> | |
<option value="Afghanistan">Afghanistan</option> | |
<option value="Åland Islands">Åland Islands</option> | |
<option value="Albania">Albania</option> | |
<option value="Algeria">Algeria</option> | |
<option value="American Samoa">American Samoa</option> | |
<option value="Andorra">Andorra</option> | |
<option value="Angola">Angola</option> |