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
<?php | |
/** | |
* A 32-bit block cipher based on skipjack. | |
* In common: F-table, G-permutation, key schedule. | |
* Different: 24 round feistel structure. | |
* | |
* Ported to PHP from C implementation at: | |
* http://www.qualcomm.com.au/PublicationsDocs/skip32.c | |
* | |
* Might not work as expected on 32-bit processors due to PHP lacking a unsigned 32-bit integer. |
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 | |
echo "ZFS listing:" | |
/sbin/zfs list | |
echo | |
echo "ZFS compression ratio:" | |
/sbin/zfs get compressratio | /usr/bin/grep -v @ | |
echo |
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
/* | |
* Frame 1 | |
*/ | |
// Initialize the Arduino and set up event handlers | |
var arduino:ArduinoControl = new ArduinoControl("127.0.0.1",5331); | |
arduino.addEventListener(Event.CONNECT, onArduinoConnect); | |
arduino.addEventListener(IOErrorEvent.IO_ERROR, reconnect); | |
function onArduinoConnect( event:Event ):void |
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
;;;;;;;;;;;;;;;;;;;;; | |
; FPM Configuration ; | |
;;;;;;;;;;;;;;;;;;;;; | |
; All relative paths in this configuration file are relative to PHP's install | |
; prefix (/usr/local). This prefix can be dynamicaly changed by using the | |
; '-p' argument from the command line. | |
; Include one or more files. If glob(3) exists, it is used to include a bunch of | |
; files from a glob(3) pattern. This directive can be used everywhere in the |
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
/* | |
* Credit goes to: | |
* http://solaris.kuehnke.de/archives/18-Checking-physical-sector-size-of-disks-on-Solaris.html | |
* Compile: gcc blocksize.c -o blocksize | |
* Use: ie. ./blocksize /dev/rdsk/c0t5000C5004A918814d0 | |
*/ | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <sys/dkio.h> |
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
// | |
// AppDelegate.h | |
// SkidtApp | |
// | |
// Created by Hans Duedal on 1/31/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
-- Clear query stats: DBCC FREEPROCCACHE | |
SELECT DISTINCT TOP 10 | |
t.TEXT QueryName, | |
s.execution_count AS ExecutionCount, | |
s.max_elapsed_time AS MaxElapsedTime, | |
ISNULL(s.total_elapsed_time / s.execution_count, 0) AS AvgElapsedTime, | |
s.creation_time AS LogCreatedOn, | |
ISNULL(s.execution_count / CAST(DATEDIFF(s, s.creation_time, GETDATE()) AS FLOAT), 0) AS FrequencyPerSec | |
FROM sys.dm_exec_query_stats s | |
CROSS APPLY sys.dm_exec_sql_text( s.sql_handle ) t |
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
# Find best replacement for Quality 60 | |
find . -type f -name "*-ipad.jpg" -print0 | xargs -0 -n 1 identify -format "%f Q:%Q" | awk '/Q:60/ { H=substr($1,0,20); F=system("test -f " H "-fullscreen.jpg"); print F ? H ".jpg" : H "-fullscreen.jpg" }' > replacements.txt | |
# Generate the commands required for conversion | |
awk '{H=substr($1,0,20); print "convert " $1 " -quality 90 -profile sRGB.icm +profile '\''!iptc,!xmp,!icc,*'\'' -define jpeg:optimize-coding=on " H "-ipad.jpg" }' replacements.txt > replacement.sh | |
awk '{H=substr($1,0,20); print "cp " H "-ipad.jpg " H "[email protected]" }' replacements.txt >> replacement.sh | |
# Run the commands | |
chmod +x replacement.sh | |
sh replacement.sh | |
# Make a list of non-Quality-60 images |