This file contains hidden or 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
/* Generate arbitrary CPU usage */ | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <err.h> | |
#include <math.h> | |
#include <sys/time.h> | |
#include <stdarg.h> | |
#include <sys/wait.h> | |
#define CPUUSAGE 0.2 /* set it to a 0 < float < 1 */ |
This file contains hidden or 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 -wKU | |
# Connects to a cs.unibo.it machine | |
require 'optparse' | |
require 'logger' | |
logger = Logger.new STDOUT | |
scriptdir = File.dirname(__FILE__) | |
options = { :logger => logger, :user => ENV['USER'], :servers => `#{scriptdir}/list_csunibo.rb`.chomp.split(',') } |
This file contains hidden or 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
-- Opens the source of the current Safari page in TextMate. | |
-- | |
-- http://iflipbits.com/post/880085979/view-source-in-textmate-for-safari | |
tell application "Safari" | |
if not (exists front document) then | |
display alert "An error as occurred" message "You need to open a web site first!" as warning | |
return | |
end if | |
This file contains hidden or 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 -e | |
# Your user web directory, typically "${HOME}/public_html" or "${HOME}/Sites" | |
PUBLIC_HTML="${HOME}/Sites" | |
# Subfolder of $PUBLIC_HTML where to put your shared repositories | |
PUBLIC_GIT="git" | |
# Save the shared repository with this remote name | |
REMOTE="public" | |
# The branch that will be pushed to your shared repository | |
BRANCH="master" |
This file contains hidden or 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 sh | |
# This script notifies when a page changes. | |
# The first argument is the url, the other is a command that will notify you, | |
# like 'growlnotify -s -p 2 -t "Title" -m "Message"' if you use Growl. | |
# | |
# Example: | |
# $ notify_page_changes.sh 'http://reddit.com' 'growlnotify -s -p 2 -t "Reddit.com" -m "Changed"' | |
# | |
# IMPORTANT: remember to put your arguments in quotation marks! |
This file contains hidden or 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 python | |
# Based on FreeBSD src/lib/libcrypt/crypt.c 1.2 | |
# http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libcrypt/crypt.c?rev=1.2&content-type=text/plain | |
# Original license: | |
# * "THE BEER-WARE LICENSE" (Revision 42): | |
# * <[email protected]> wrote this file. As long as you retain this notice you | |
# * can do whatever you want with this stuff. If we meet some day, and you think | |
# * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp |
This file contains hidden or 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 | |
require 'ftools' | |
require 'fileutils' | |
require 'rubygems' | |
require 'RMagick' | |
include Magick | |
require 'open3' | |
def merge( files = [] ) |
This file contains hidden or 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 <iostream> | |
#include <string> | |
#include <map> | |
using namespace std; | |
int main (int argc, char const *argv[]) | |
{ | |
string array[] = { "zero", "one", "one", "zero", "two", "three", "zero" }; |
This file contains hidden or 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
(* | |
Opens the generated source of the current Safari page in TextMate. | |
To make it a System Service (with keyboard shorcuts!), visit: | |
http://iflipbits.com/post/880085979/view-source-in-textmate-for-safari | |
*) | |
tell application "Safari" | |
if not (exists front document) then | |
display alert "An error as occurred" message "You need to open a web site first!" as warning |
This file contains hidden or 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
hlink.o | |
hlink |
OlderNewer