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
### | |
Module dependencies. | |
### | |
express = require 'express' | |
app = module.exports = express.createServer() | |
### | |
Configuration |
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 parent = function(){this.hoge = 'foo';}; | |
> parent.prototype.p = function() { this.px(this.hoge);}; | |
[Function] | |
> parent.prototype.px = function(x) { console.log(x);}; | |
[Function] | |
> var child = function(){parent.apply(this); this.events=['foo'];}; | |
> child.prototype = parent.prototype; | |
{ p: [Function], px: [Function] } | |
> var c = new child(); | |
> c.p(); |
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 org.fukata.hadoop; | |
import java.io.IOException; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.Text; |
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 | |
############################################# | |
# Eratosthenes's Sieve | |
# | |
# see http://ja.wikipedia.org/wiki/%E3%82%A8%E3%83%A9%E3%83%88%E3%82%B9%E3%83%86%E3%83%8D%E3%82%B9%E3%81%AE%E7%AF%A9 | |
# | |
# Usage | |
# arg1: int Integer limit | |
# |
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(){ |