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
function get_fd_count() { | |
local fds | |
cd /proc/$$/fd; fds=( * ) # avoid a StackOverflow source colorizer bug | |
echo "${#fds[@]}" | |
} | |
function fd_leak_func() { | |
while : ; do | |
echo ">> Current FDs: $(get_fd_count)" | |
read retval new_state < <(set +e; new_state=$(echo foo); retval=$?; printf "%d %s\n" $retval $new_state) |
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
altscreen on | |
attrcolor b ".I" | |
autodetach on | |
caption always "%?%F%{= Kk}%:%{=u kR}%? %h %-024=%{= Kk} %C%a %D %d %M %Y%{= db}" | |
defbce "on" | |
defflow off | |
defscrollback 10000 | |
defutf8 on | |
escape ^`` | |
hardstatus alwayslastline "%{= kR} %-Lw%{= Kk} %n%f %t %{-}%+Lw %=%{= dd}" |
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
# http://tldp.org/LDP/abs/html/contributed-scripts.html#HASHLIB | |
# Hash function library | |
# Author: Mariusz Gniazdowski <mariusz.gn-at-gmail.com> | |
# Date: 2005-04-07 | |
# Author: Charles Duffy <[email protected]> | |
# Date: 2010-10-21 | |
# Functions making emulating hashes in Bash a little less painful. |
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
;; running the following code | |
(System/setProperty "jclouds.endpoint.Walrus" "http://euca.local:8773/services/Walrus") | |
(System/setProperty "jclouds.endpoint" "http://euca.local:8773/services/Eucalyptus") | |
(use 'pallet.compute 'pallet.maven) | |
(pallet.compute/compute-service-from-settings) | |
;; ...given the following in ~/.m2/settings.xml /settings/profiles/profile[activation/activateByDefault='true']/properties | |
<pallet.compute.provider>eucalyptus</pallet.compute.provider> |
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
Some Humor: I've been attending the USENIX NT and LISA NT (Large Installation Systems Administration for NT) conference in downtown Seattle this week. | |
One of those magical Microsoft moments(tm) happened yesterday and I thought that I'd share. Non-geeks may not find this funny at all, but those in geekdom (particularly UNIX geekdom) will appreciate it. | |
Greg Sullivan, a Microsoft product manager (henceforth MPM), was holding forth on a forthcoming product that will provide Unix style scripting and shell services on NT for compatibility and to leverage UNIX expertise that moves to the NT platform. The product suite includes the MKS (Mortise Kern Systems) windowing Korn shell, a windowing PERL, and lots of goodies like awk, sed and grep. It actually fills a nice niche for which other products (like the MKS suite) have either been too highly priced or not well enough integrated. | |
An older man, probably mid-50s, stands up in the back of the room and asserts that Microsoft could have done better with their choi |
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
curl -v -XPUT 'localhost:9200/_river/logstash/_meta' -d '{ | |
"type" : "rabbitmq", | |
"rabbitmq" : { | |
"host" : "192.168.123.8", | |
"port" : 5672, | |
"user" : "logstash", | |
"pass" : "logstash", | |
"vhost" : "logstash", | |
"exchange" : "parsed_logs", | |
"exchange_type" : "fanout", |
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
#node is an already known package. node.js have dot in name, so "nodejs" | |
#is a better name | |
#some ideas are taken from | |
#http://blog.fpmurphy.com/2010/12/node-js-and-npm-on-fedora-14.html | |
Name: nodejs | |
Version: 0.4.0 | |
Release: 0%{?dist} | |
Summary: JavaScript server-side network application development | |
Group: Development/Languages/Other | |
License: MIT |
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 | |
# | |
# Parse Mozilla's certdata.txt and extract CA Root Certificates into PEM | |
# format. | |
# | |
# Based on http://curl.haxx.se/mail/lib-2004-07/0134.html; cleaned up to | |
# follow fewer worst practices for bash :) | |
# | |
# certdata.txt can be found in Mozilla's source tree: | |
# /mozilla/security/nss/lib/ckfw/builtins/certdata.txt |
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 | |
while read -r diff | |
do | |
echo "$diff" | |
done < <(comm -12 <(sort db) <(sort dbnew))) |
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
reading=0 | |
while read; do | |
if [[ $REPLY = *BEGIN* ]]; then | |
current_cert="" | |
reading=1 | |
fi | |
if (( reading )) ; then | |
current_cert+="$REPLY"$'\n' | |
fi |
OlderNewer