UUIDGEN 解説 Universal IDs (GUID/UUID) — CCPN Plone Site Information Generation of universal IDs is still a developing field, apparently. A quick google turns up http://home.arcor.de/jurner/python/#pkg-uuid-0.3.1 http://sourceforge.net/tracker/index.php?func=detail&aid=1368955&group_id=5470&atid=305470 which are new since Peter sent out his summarising mail For the time being I am using the uuid generator from
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
var pos = document.location.hash.search( /setCanvasHeight/ ) | |
if( pos >= 0 ){ | |
hashvpos = document.location.hash.search( /setCanvasHeight%22%2C%22([0-9]+)px/ ); | |
crop = document.location.hash.substring(hashvpos+24); | |
pxpos = crop.search("px"); | |
heighthack = crop.substring( 0, pxpos ); | |
if( heighthack > 300 ){ | |
newv = document.location.hash.replace( "setCanvasHeight%22%2C%22"+heighthack, "setCanvasHeight%22%2C%22300" ); | |
document.location.hash = newv; | |
} |
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 | |
/** | |
* https://gist.github.com/923041 | |
* | |
* converting between nested object and nested array, bidirectional | |
*/ | |
function object2array( $srcobject , array $exclude_propnames = null ){ | |
assert( gettype($srcobject) == "object" ); |
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 | |
function unicode2utf8($aa){ | |
###var_dump(func_get_args()); | |
return mb_convert_encoding( pack("n", hexdec($aa[1]) ), "utf-8", "ucs2" ); | |
} | |
while( ($f=fgets(STDIN))!==false ){ | |
$a = str_replace('\\','\',$a ); | |
$a = preg_replace_callback('/\\\u([a-f0-9]{4})/i', "unicode2utf8", $f ); |
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
import sys,os, time | |
timeo = os.stat(sys.argv[0]) | |
DEBUGMODE = ( time.time() - timeo.st_mtime ) < 60 |
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 -x | |
TMP=/tmp/$$ | |
mkdir $TMP | |
trap "/bin/rm -rf $TMP" 0 3 6 9 15 | |
lsusb | ( | |
if [ $# -gt 0 ] | |
then | |
fgrep $1 | |
else | |
cat |
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
# | |
# https://gist.github.com/kamawanu/6820f0bc061351d0dd14/ | |
# | |
# https://gist.githubusercontent.com/kamawanu/6820f0bc061351d0dd14/raw/_.awk | |
# | |
# adb shell cat /system/build.prop | awk -f $ITS | |
# | |
BEGIN { | |
FS="=" | |
} |
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
package main | |
import ( | |
"os" | |
"flag" | |
"fmt" | |
"io" | |
) | |
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 -x | |
PART=$1 | |
MSIZE=${2-20} | |
FS=${3-ext4} | |
SIZE=$( expr $MSIZE \* 1024 \* 1024 ) | |
LAST=$( expr $SIZE - 1 ) | |
dd if=/dev/zero bs=1k count=1 seek=$LAST of=/host/linuxmint/$PART.disk | |
mkfs.$FS /host/linuxmint/$PART.disk || exit 9 | |
ls -l /host/linuxmint/$PART.disk | |
du -sm /host/linuxmint/$PART.disk |
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
.post_thumb , .image, .grid .image .icon, .grid .photoset .icon, .grid .video .bg, .grid .image .bg { | |
width: 200px; height: 200px; | |
} |