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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import json | |
import os | |
import re | |
from optparse import make_option | |
from collections import OrderedDict | |
from django.core.urlresolvers import get_urlconf, get_resolver |
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
# -*- coding:utf-8 -*- | |
import math | |
class Fleet(object): | |
level = 0 | |
ships = [] | |
def __init__(self, level, *ships): | |
self.level = level |
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
# -*- coding:utf-8 -*- | |
""" | |
.apk/.ipaをDeployGateにアップロード、配布ページをChatWorkで通知する | |
""" | |
from __future__ import unicode_literals | |
from __future__ import print_function | |
from argparse import ArgumentParser | |
import os | |
import requests |
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 subprocess | |
from logbook.data import DataType | |
def osx_notify(message): | |
subprocess.call(('/opt/local/bin/terminal-notifier', '-message', message)) | |
desktop_notify = osx_notify |
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 | |
plistBuddy="/usr/libexec/PlistBuddy" | |
infoPlistFileSource="${SRCROOT}/${INFOPLIST_FILE}" | |
infoPlistFileDestination="${TEMP_DIR}/Preprocessed-Info.plist" | |
currentVersion=$($plistBuddy -c "Print CFBundleVersion" $infoPlistFileSource) | |
timeStamp=$(date '+%s') | |
versionString="$currentVersion.$timeStamp" | |
$plistBuddy -c "Set :CFBundleVersion $versionString" $infoPlistFileDestination |
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
----- | |
libxml2 is missing. Please locate mkmf.log to investigate how it is failing. | |
----- |
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 | |
mkdir -p drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi | |
for name in foo bar; do | |
convert -resize 216x116 "${name}@3x.png" "${name}@2x.png" | |
convert -resize 162x87 "${name}@3x.png" "${name}@1.5x.png" | |
convert -resize 108x58 "${name}@3x.png" "${name}.png" | |
convert "${name}@3x.png" -background transparent -gravity northeast -splice 1x1 tmp.png | |
convert tmp.png -background transparent -gravity southwest -splice 1x1 "drawable-xxhdpi/${name}.9.png" |
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 get_item_where_froms($filename) | |
{ | |
$command = '/usr/bin/xattr -p "com.apple.metadata:kMDItemWhereFroms" ' | |
. escapeshellarg($filename) . ' 2>&1 | sed "s/ //g"'; | |
$line = exec($command, $output, $retval); | |
if ($retval === 0) { | |
$len = hexdec(substr($line, -2)); | |
$str = ''; |
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
diff -ur sqlite3-0.7-dev/php_sqlite3.h sqlite3-0.7-dev-php-5.2/php_sqlite3.h | |
--- sqlite3-0.7-dev/php_sqlite3.h 2010-01-03 18:23:27.000000000 +0900 | |
+++ sqlite3-0.7-dev-php-5.2/php_sqlite3.h 2010-06-26 05:58:21.000000000 +0900 | |
@@ -40,6 +40,17 @@ | |
#define PHP_SQLITE3_NUM 1<<1 | |
#define PHP_SQLITE3_BOTH (PHP_SQLITE3_ASSOC|PHP_SQLITE3_NUM) | |
+#define MAKE_COPY_ZVAL(ppzv, pzv) \ | |
+ *(pzv) = **(ppzv); \ | |
+ zval_copy_ctor((pzv)); \ |
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 | |
// アスペクト比が4:3になっているDVファイルのヘッダを書き換えて16:9に変更する | |
define('SEARCH_BEGIN', 0x1C0); | |
define('SEARCH_END', 0x1D0); | |
define('FLAG_4_3', "\xC8"); | |
define('FLAG_16_9', "\xCA"); | |
if ($argc < 2) { | |
fwrite(STDERR, "Too few arguments.\n"); |
OlderNewer