- http://tutsplus.com/tutorial/writing-modular-javascript/
- https://github.com/aranm/scalable-javascript-architecture
- https://github.com/patrick99e99/scalable-js-architecture-app
- http://scaleapp.org/
- http://addyosmani.com/largescalejavascript/
- https://github.com/tcorral/Hydra.js/
- http://alanlindsay.me/kerneljs/
- http://terrifically.org/
- https://github.com/gorillatron/cerebral
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
// uninstalling global packages(express in this example): | |
npm uninstall [pkg] -g | |
//view info about a certain package: | |
npm view [pkg] | |
//check globally installed npm modules | |
npm -g ls |
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
hexdump sqldump.sql | head | |
0000000 6157 6e72 6e69 3a67 5420 6568 6f20 7470 | |
0000010 6f69 206e 2d27 612d 6c6c 2027 7369 6420 | |
0000020 7065 6572 6163 6574 2064 6e61 2064 6977 | |
0000030 6c6c 6220 2065 6572 6f6d 6576 2064 6e69 | |
0000040 6120 6620 7475 7275 2065 6572 656c 7361 | |
0000050 2e65 5020 656c 7361 2065 7375 2065 2d2d | |
0000060 7263 6165 6574 6f2d 7470 6f69 736e 6920 | |
0000070 736e 6574 6461 0a2e 2d2d 4d20 5379 4c51 | |
0000080 6420 6d75 2070 3031 312e 2033 4420 7369 |
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
# a better nginx config | |
02 | |
# author @dnoiz1 | |
03 | |
04 | |
server { | |
05 | |
root /var/www/mysite.tld/; | |
06 |
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
source article: | |
http://backdrift.org/transparent-proxy-with-ssh | |
Creating a transparent SSH tunnel through a bastion host using the ProxyCommand configuration parameter | |
Tags: linux, ssh, unix | |
Like most users out there (I think) my systems are usually configured to allow ssh connections from a small handfull of trusted hosts or a bastion host. This is decent security practice but is a total pain when you want to scp a file or grab the stdout of a command from a host outside the trusted area. Or perhaps you have a number of hosts on a private subnet and only one routable host to get in through. I was able to set up a method which allows for transparent access to a host while behind the scenes tunneling through a trusted bastion host involving some pretty minor adjustments to the .ssh/config file. | |
Here’s how it works: |
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
# Server configuration for example.com | |
server { | |
# Require HTTP authentication. | |
#auth_basic "Restricted"; | |
#auth_basic_user_file /home/example/.htpasswd; | |
# Limit each user to 20 max connections. | |
limit_conn default 20; |
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
server { | |
server_name domain.tld; | |
root /var/www/drupal6; ## <-- Your only path reference. | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = /robots.txt { |
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
server { | |
listen 80; | |
server_name subdomain.domain.com; | |
access_log /home/user/drupal/logs/access.log; | |
error_log /home/user/drupal/logs/error.log; | |
client_max_body_size 6M; |
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
// The simplest implementation I can write. | |
function qsort(array) { | |
var lower, upper, pivot; | |
if (array.length <= 1) { | |
return array; | |
} |
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
Simple version | |
In simple pseudocode, the algorithm might be expressed as this: | |
function quicksort('array') | |
if length('array') ≤ 1 | |
return 'array' // an array of zero or one elements is already sorted | |
select and remove a pivot value 'pivot' from 'array' | |
create empty lists 'less' and 'greater' | |
for each 'x' in 'array' |