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
<?php | |
/* | |
* Copyright 2011, Tim Kuijsten | |
* Released under the MIT license. | |
* http://creativecommons.org/licenses/MIT/ | |
*/ | |
/** | |
* Generate a random string of base 62 characters [a-zA-Z0-9]. | |
* |
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/sh | |
# | |
# Copyright (c) 2011 Netsend | |
# Released under the MIT license. | |
# | |
### | |
# create a local ssh SOCKS proxy to RHOST and update OS X proxy settings. | |
# Tip: make your programs use the default OS X proxy. | |
##### |
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
if [ -f ~/.ssh/known_hosts ]; then | |
HOSTLIST=$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | sed -e 's/^\[\(.*\)\].*/\1/g' | egrep -v '^[0-9]' | uniq`;) | |
complete -o bashdefault -o default -W "${HOSTLIST}" ssh | |
complete -o bashdefault -o default -o nospace -W "${HOSTLIST}" scp | |
complete -o bashdefault -o default -o nospace -W "${HOSTLIST}" ping | |
fi |
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
# if we have private keys, load ssh-agent or connect to an already running agent | |
if [ -r $HOME/.ssh/id_rsa -o -r $HOME/.ssh/id_dsa -o -r $HOME/.ssh/identity ]; then | |
SSH_SOCKET=$HOME/.ssh/.ssh-socket | |
# ensure socket | |
ps -cx | grep -q '[s]sh-agent' | |
if [ 0 -ne $? ]; then | |
old_umask=$(umask) | |
umask 0077 |
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/sh | |
# sshsock - Quick 'n dirty VPN for macOS | |
# | |
# Usage example: | |
# Let Apple Mail, Safari and Firefox route all traffic via your ssh server at | |
# foo.example.com by using a system-wide local SOCKS proxy: | |
# | |
# $ sshsock foo.example.com | |
# Password: |
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
diff --git a/node_modules/mongodb/lib/mongodb/connection/connection.js b/node_modules/mongodb/lib/mongodb/connection/connection.js | |
index 4b65528..b3f4686 100644 | |
--- a/node_modules/mongodb/lib/mongodb/connection/connection.js | |
+++ b/node_modules/mongodb/lib/mongodb/connection/connection.js | |
@@ -115,18 +115,35 @@ Connection.prototype.isConnected = function() { | |
return this.connected && !this.connection.destroyed && this.connection.writable && this.connection.readable; | |
} | |
+var emitDocuments = function(command, connection) { | |
+ var documents = []; |
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
// default to $main, used in mongod master mode | |
var oplogCollection = '$main'; | |
// if not master, assume a replicaset is used | |
if (config.db_mode !== 'master') { | |
oplogCollection = 'rs'; | |
} | |
var mongoDb = require("mongodb"), | |
mongoServer = new mongoDb.Server(config.db_host, config.db_port), |
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
Yesterday, after evangelizing Ubuntu for years and running Ubuntu on my | |
parents desktop since 2009, I finally "relieved" them by giving them | |
Windows 7 as a gift. | |
For years I had the hope that every Ubuntu release would get better | |
than the previous edition. That the vision of Canonical aligned with my | |
vision of openness and where user rights are put central. I took the | |
fact that some proprietary things didn't work for granted and thought | |
we could fight it best by adding weight to the open source movement and | |
use open source software while demanding open codecs, standards etc. |
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/sh | |
# copy to /usr/local/bin | |
# usage: genpass [length] | |
LENGTH=12 | |
if [ 0 -lt $(($1)) ]; then | |
LENGTH=$1 | |
fi |
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/sh - | |
# The important part is not to put the password as an argument to the mysql | |
# commands, i.e. don't use the -p option. Instead use a .my.cnf file in the home | |
# dir of the user you are running this script as, i.e. /root/.my.cnf if running | |
# as root. Make the file readable for the owner only: chmod 400 /root/.my.cnf | |
# See: http://stackoverflow.com/questions/17829659/securing-backup-credentials-for-mysqldump/17844997#17844997 | |
umask 007 |
OlderNewer