Skip to content

Instantly share code, notes, and snippets.

@victorreyesh
victorreyesh / Aircrack Commands
Created September 12, 2013 03:36
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//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]
@agrueneberg
agrueneberg / client.html
Last active March 19, 2023 06:48
HMAC-SHA256 example for verifying both the data integrity and the authentication of a request in Node.js and web browsers.
<!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;
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
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
@alienlebarge
alienlebarge / README.md
Last active March 20, 2023 10:16
Setting proxy with node.js

Node.js behind a proxy

Write proxy settings

$ npm config set proxy http://localhost:3128
$ npm config set https-proxy http://localhost:3128

This config is great for SquidMan app.

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

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,
@alexhawkins
alexhawkins / nativeJavaScript.js
Last active April 28, 2024 08:52
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests
@mathisonian
mathisonian / index.md
Last active March 22, 2023 05:31
requiring npm modules in the browser console

demo gif

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

inspiration

@alexanderscott
alexanderscott / ZSUM.lua
Created January 26, 2015 08:53
Redis Lua script to return the sum of all scores in a ZSET
-- @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)
@danrovito
danrovito / countrydropdown.html
Last active May 28, 2024 12:18
HTML Country Select Dropdown List
<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>