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/env python | |
# -*- coding: utf-8 -*- | |
def random_chars(num=36): | |
import random | |
chars = "asdfghjkqwertyuopzxcvbnm1234567890ASDFGHJKLZXCVBNMQWERTYUOP" | |
strs = [random.choice(chars) for x in range(num)] | |
return ''.join(strs) |
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
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var _st = {"activate_code":"[アクティベートコード]"}; | |
</script> | |
<script type="text/javascript" src="http://site-thermography.appspot.com/media/js/thermography.js"></script> |
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 | |
######################################################## | |
# | |
# 普段、gitなどで開発し、WordPressプラグインリポジトリの | |
# tagsディレクトリをリリース目的のみに利用している人用のスクリプト | |
# | |
# Usage: | |
# ./release2wp.sh repo release_dir tag [msg] | |
# |
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 | |
########################################################### | |
# | |
# Clone repo: | |
# git clone git://gist.github.com/973205.git attendance | |
# | |
# Create Database: | |
# mysqladmin -u root atnd | |
# mysql -u root atnd < attendance/ddl.sql |
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 --git a/ajaxtranslation.php b/ajaxtranslation.php | |
index 1baf716..70f313e 100644 | |
--- a/ajaxtranslation.php | |
+++ b/ajaxtranslation.php | |
@@ -723,6 +723,51 @@ if (!class_exists('GoogleTranslation')) { | |
return $translate_block; | |
} | |
+ /** | |
+ * get a translate button that can be used anywhere in a post or page as needed by a custom theme. This should be in the WordPress loop. |
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 notification = webkitNotifications.createNotification( | |
'icon-48.png', | |
'TITLE', | |
'BODY' | |
); | |
notification.ondisplay = function(){ | |
var self = this; | |
var close_interval = 5000; | |
setTimeout(function(){ |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Loader extends CI_Loader { | |
public function __construct() { | |
parent::__construct(); | |
} | |
/** | |
* CI_Loader::_ci_load is private method. | |
* | |
* (non-PHPdoc) |
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 -ru CodeIgniter_2.0.2/application/config/autoload.php CodeIgniter_2.0.3/application/config/autoload.php | |
--- CodeIgniter_2.0.2/application/config/autoload.php 2011-04-08 02:20:00.000000000 +0900 | |
+++ CodeIgniter_2.0.3/application/config/autoload.php 2011-08-20 20:59:14.000000000 +0900 | |
@@ -37,7 +37,7 @@ | |
| | |
*/ | |
-$autoload['packages'] = array(APPPATH.'third_party'); | |
+$autoload['packages'] = array(); | |
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 | |
DIR=${1?'pictures directory require.'} | |
DIR=${DIR%/} | |
PIC_DIR='YOUR SAVE PICTURE ROOT PATH' | |
total=$(ls $DIR |wc -l) | |
count=1 | |
for line in $(ls -lt $DIR |awk '{print $6","$8}') | |
do |
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
--- CodeIgniter_2.0.3/application/config/database.php 2011-08-20 20:59:14.000000000 +0900 | |
+++ application/config/database.php 2011-09-05 14:04:52.375136218 +0900 | |
@@ -45,6 +45,9 @@ | |
*/ | |
$active_group = 'default'; | |
+if (defined('CIUnit_Version')) { | |
+ $active_group .= '_test'; | |
+} | |
$active_record = TRUE; |