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
OIFS="$IFS" | |
IFS=$'\n' | |
export i=1 | |
for fil in `ls -tr *.flv` ; do mv "${fil}" $i.flv; i=$(($i + 1 )); done |
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 | |
PUPPET_RUBY_DIR="/usr/local/puppetandruby" | |
PUPPET_MSTR_SERVER=" rov-master. .com" | |
# Let the path find puppet's ruby first | |
export PATH=${PUPPET_RUBY_DIR}/bin/:$PATH |
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
Nginx must also be configured. Firstly the stub-status module must be | |
compiled, and secondly it must be configured like this: | |
server { | |
listen 127.0.0.1; | |
server_name localhost; | |
location /nginx_status { | |
stub_status on; | |
access_log off; |
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
mysql> SELECT TABLE_SCHEMA,SUM(DATA_LENGTH) SCHEMA_LENGTH FROM information_schema.TABLES WHERE TABLE_SCHEMA!='information_schema' GROUP BY TABLE_SCHEMA ; | |
+--------------+---------------+ | |
| TABLE_SCHEMA | SCHEMA_LENGTH | | |
+--------------+---------------+ | |
| mysql | 481714 | | |
| puppet | 229376 | | |
+--------------+---------------+ | |
2 rows in set (0.03 sec) | |
mysql> SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_ROWS,DATA_LENGTH FROM information_schema.TABLES WHERE TABLE_SCHEMA!='information_schema' |
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 | |
# This file is managed by puppet | |
# | |
# Changes here will be overwritten | |
# Cron to keep in sync with the svn codebase | |
# | |
# Fetches the SVN location specified | |
# Update the local copy if the dest dir already present | |
# | |
# Logs error only |
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
<html> | |
<head> | |
<script type="application/javascript"> | |
function draw() { | |
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext("2d"); | |
ctx.fillStyle = "rgb(200,0,0)"; | |
ctx.fillRect (10, 10, 55, 50); | |
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
! | |
! Swap Caps_Lock and Control_L | |
! | |
remove Lock = Caps_Lock | |
remove Control = Control_L | |
keysym Control_L = Caps_Lock | |
keysym Caps_Lock = Control_L | |
add Lock = Caps_Lock | |
add Control = Control_L |
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
mysqldump --no-data --all-databases --verbose > all_schema.sql |
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 tcpdump -ieth0 -lnx -s 1024 dst port 80 -v -X -w /tmp/cap.pcap |
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
for fil in `ls *.jpg` ; | |
do name=${fil%.*}; | |
convert -thumbnail 200 $fil ${name}_thumb.jpg; | |
done |