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
# Converts the Export of Enpass to a format readable by KeePass | |
# | |
# This file is not heavily tested but worked for me in most cases. Of course | |
# some manual steps to regroup and edit the entries had to be done afterwards | |
# | |
# Exported with Enpass 4.0.1: File > Export > TXT | |
# ruby convert_enpass_to_keepass.rb FILENAME.txt > OUTPUT.xml | |
# Imported with KeePassX 0.4.3: File > Import from ... > KeePassX XML (*.xml) | |
require 'set' |
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
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
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
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
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 http://graphite.livingsocial.net/metrics/index.json > graphite_stats_names.json | |
% irb | |
1.9.3-p448 :001 > require 'json' | |
=> true | |
1.9.3-p448 :002 > pp JSON.parse(File.read("graphite_stats_names.json")).group_by {|g| g.match(/[^\.]+\.[^\.]+\.[^\.]+/).to_s}.map {|k, v| [k, v.size]}.sort_by {|s| s[1]}[-30..-1] | |
[["stats.timers.browse", 714], | |
["stats.pipeline.mark_live", 804], | |
["stats_counts.pipeline.mark_live", 804], | |
["livingsocial.mailing.pmta", 837], | |
["stats.timers.canopy", 897], |
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
# sudo vi /etc/ssh/sshd_config | |
ClientAliveInterval 18 | |
ClientAliveCountMax 100 | |
# sudo service ssh restart | |
# exit |
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
#!/usr/bin/env ruby | |
# Compares semantic versions of cookbooks, by looking at the metadata.rb file and | |
# rejects pushes if the cookbook version has not been bumped. If running this | |
# script from another script, remeber to pass along the parameters to this | |
# script. | |
# | |
# Requires a gem install semantic. | |
require 'rubygems' | |
require 'semantic' |
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
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
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
;;; gravatar.el --- Get Gravatars | |
;; Copyright (C) 2010 Free Software Foundation, Inc. | |
;; Author: Julien Danjou <julien@danjou.info> | |
;; Keywords: news | |
;; This file is part of GNU Emacs. | |
;; GNU Emacs is free software: you can redistribute it and/or modify |