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
/* | |
All code apart from getPlusones() | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
========================================== WINDOW (TAB) | |
TMUX COMMAND ========================================== | |
========================================== | |
List ^b w | |
List tmux ls Create ^b c | |
New -s <session> Rename ^b , <name> | |
Attach att -t <session> Last ^b l (lower-L) | |
Rename rename-session -t <old> <new> Close ^b & | |
Kill kill-session -t <session> | |
Goto # ^b <0-9> |
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
RVM home page: http://rvm.beginrescueend.com | |
Install RVM | |
------------ | |
See http://rvm.beginrescueend.com/rvm/install/ | |
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
Install rvm for all users |
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
#!./bin/knife exec | |
# A knife exec script to change chef node's name, preserving all the attributes. | |
# | |
# Usage: knife exec rename-node.rb old-name new-name | |
# | |
# Script retrieves the Node object, changes its 'name' attribute, | |
# creates new Node object with updated name and rest of attributes | |
# untouched. Then it deletes old Node and Client objects from | |
# database, and logs into the server to update it: |
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
# vim: ft=sh:ts=4:sw=4:autoindent:expandtab: | |
# Author: Avishai Ish-Shalom <[email protected]> | |
# We need to specify GNU sed for OS X, BSDs, etc. | |
if [[ "$(uname -s)" == "Darwin" ]]; then | |
SED=gsed | |
else | |
SED=sed | |
fi |
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
# vim: ft=sh:ts=4:sw=4:autoindent:expandtab: | |
# Author: Avishai Ish-Shalom <[email protected]> | |
# We need to specify GNU sed for OS X, BSDs, etc. | |
if [[ "$(uname -s)" == "Darwin" ]]; then | |
SED=gsed | |
else | |
SED=sed | |
fi |
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
#!/bin/bash | |
/sbin/ss -ant | awk "{if (NR>1) {state[\$1]++}} END {host = \"-\"; \ | |
for (i in state) {s=i; \ | |
sub (/ESTAB/, \"establ\", s); sub (/LISTEN/, \"listen\", s); sub (/SYN-SENT/, \"synsent\", s); \ | |
sub (/SYN-RECV/, \"synrecv\", s); sub (/FIN-WAIT-1/, \"finw1\", s); sub (/FIN-WAIT-2/, \"finw2\", s); \ | |
sub (/CLOSE-WAIT/, \"closew\", s); sub (/TIME-WAIT/, \"timew\", s); print host, \"tcp.\"s, state[i]}}" \ | |
| /usr/bin/zabbix_sender -vv -c /etc/zabbix/zabbix_agentd.conf -i - 2>&1 | |
echo "1" | |
exit 0 |
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
require 'formula' | |
class MidnightCommander < Formula | |
homepage 'http://www.midnight-commander.org/' | |
url 'http://www.midnight-commander.org/downloads/mc-4.8.10.tar.bz2', | |
:using => CurlUnsafeDownloadStrategy | |
mirror 'http://fossies.org/linux/misc/mc-4.8.10.tar.bz2' | |
sha256 '5f4166fe78fbf4b42f51ed526ca7f79fea8c77d04355c2b97d4df2a6bd2a1b1a' | |
depends_on 'pkg-config' => :build |
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
diff -udpr src/subshell.c.orig src/subshell.c | |
--- src/subshell.c.orig 2013-08-02 18:02:39.000000000 +0300 | |
+++ src/subshell.c 2013-10-28 10:47:34.000000000 +0200 | |
@@ -769,7 +769,7 @@ init_subshell (void) | |
{ | |
/* This must be remembered across calls to init_subshell() */ | |
static char pty_name[BUF_SMALL]; | |
- char precmd[BUF_SMALL]; | |
+ char precmd[BUF_MEDIUM]; |
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
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
Usage: $0 [OPTIONS] -h hosts.txt local remote | |
-h hosts file (each line "host") | |
-r recusively copy directories (OPTIONAL) | |
-l username | |
-p max number of parallel threads (OPTIONAL) |
OlderNewer