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/python | |
import os | |
repos = [''] # list of repo names here... | |
for repo in repos: | |
print repo | |
shortname = repo.split('.git')[0] | |
os.system('git clone --bare me@oldserver:/git/%s' % repo) | |
os.chdir(repo) |
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/python | |
#Copyright (c) 2012 Kyle Harrigan | |
# | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is | |
#furnished to do so, subject to the following conditions: | |
# |
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
#include <openssl/md5.h> | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char**argv) | |
{ | |
FILE *fh; | |
long filesize; | |
unsigned char *buf; |
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
outname=$1 | |
startdir=$(pwd) | |
tmpdir=scan-$RANDOM | |
DEVICENAME=pixma:04A926B5_SFF780310398A | |
if [ $# -lt 1 ] | |
then | |
echo "Usage: scan.sh <filename.pdf>" | |
exit 1; | |
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
# Example 1 - Remove file after every iteration... note inodes are | |
# often reused after each deletion | |
for i in {1..1000}; do | |
filename=/tmp/file$i | |
echo "Creating " $filename | |
echo "blahblah" > $filename | |
stat -c "%i" $filename | |
echo "Removing " $filename | |
rm $filename | |
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
awk '{print $2}' ssh_host_rsa_key.pub | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/python | |
from twisted.internet import task | |
from twisted.internet import reactor | |
from subprocess import Popen, PIPE, STDOUT | |
logfile = open('status.txt', 'a') | |
def runEverySecond(): | |
output = Popen(["ssh", "user@host", "date"], stdout=PIPE, stderr=STDOUT).communicate()[0] |
NewerOlder