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 | |
# pre-commit hook to syntax check puppet manifests and erb templates | |
# at checkin. | |
# Stig Sandbeck Mathisen <ssm@fnord.no> | |
# | |
# Modified to run with puppet < 2.7 as well, Cosimo 13/Dec/2011 | |
# | |
# Requirements: |
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 | |
### BEGIN INIT INFO | |
# Provides: memcached | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: memcached - Memory caching daemon |
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 perl | |
# | |
# Convert Opera contacts file (.adr) into | |
# mutt aliases file format. | |
# | |
# Usage: | |
# perl opera-adr-to-mutt-aliases.pl < ~/.opera/contacts.adr >> ~/.mutt/aliases | |
# | |
# Cosimo, 31/Jan/2011 | |
# |
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 perl | |
# The way you usually do it with Moose | |
package Moosy { | |
use Moose; | |
has number => ( | |
is => 'ro', | |
isa => 'Int', | |
); |
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 | |
# | |
# Convert remote tags imported from SVN to real git tags | |
# | |
REMOTE_TAGS=$(git branch -r | grep 'tags/' | cut -f2 -d/) | |
GIT=$(which git) | |
for t in $REMOTE_TAGS | |
do |
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
Cpu(s): 10.0%us, 7.0%sy, 0.0%ni, 80.6%id, 0.0%wa, 0.0%hi, 2.4%si, 0.0%st | |
Mem: 1058730500k total, 22323100k used, 1036407400k free, 103608k buffers | |
Swap: 11558908k total, 0k used, 11558908k free, 2564672k cached | |
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | |
132101 nobody 20 0 2239m 904m 748m S 2117 0.1 53:26.55 varnishd | |
132977 test 20 0 23952 1728 1260 R 100 0.0 0:56.71 httperf | |
132978 test 20 0 23952 1728 1260 R 100 0.0 0:54.73 httperf | |
132980 test 20 0 23952 1732 1260 R 100 0.0 0:43.50 httperf | |
132981 test 20 0 23952 1728 1260 R 100 0.0 0:34.78 httperf |
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/sh | |
# | |
# Tells the Debian version reading the OpenSSH banner | |
# Requires OpenSSH to be running and ssh port to be open. | |
# | |
# Usage: $0 <hostname> | |
# | |
# Cosimo, 23/11/2011 | |
HOST=$1 |
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
from selenium import webdriver | |
driver = webdriver.Opera() | |
driver.get_screenshot_as_file('/Users/ato/Desktop/1.png') | |
driver.quit() |
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
<meta name="viewport" content="width=device-width, initial-scale=1"> |
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/perl -w | |
use 5.010; | |
use strict; | |
use warnings; | |
use threads; | |
use Thread::Queue; | |
use autodie qw(:all); | |
use Image::ExifTool qw(ImageInfo); | |
use Data::Dumper; | |
use Imager; |
OlderNewer