Skip to content

Instantly share code, notes, and snippets.

View yusuke's full-sized avatar

Yusuke Yamamoto yusuke

View GitHub Profile
/*
* Copyright 2007 Yusuke Yamamoto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* *
* Copyright 2014 Yusuke Yamamoto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
__author__ = 'yusuke'
import sqlite3
con = sqlite3.connect("emp.db")
sql = u"insert into emp values (?)"
con.execute(sql, '\'')
con.execute(sql, '\"')
con.commit()
con.close()
@yusuke
yusuke / gist:8841559
Created February 6, 2014 10:10
sqlite.py
__author__ = 'yusuke'
import sqlite3
con = sqlite3.connect("emp.db")
sql = u"insert into emp values (?)"
con.execute(sql, '\'')
con.commit()
con.close()
Last login: Sun Jan 12 17:14:47 on ttys000
18:41 ~ $ wget openjdk.java.net
--2014-01-12 18:41:13-- http://openjdk.java.net/
Resolving openjdk.java.net... 192.9.170.173
Connecting to openjdk.java.net|192.9.170.173|:80... failed: Operation timed out.
Retrying.
--2014-01-12 18:42:31-- (try: 2) http://openjdk.java.net/
Connecting to openjdk.java.net|192.9.170.173|:80... failed: Operation timed out.
Retrying.
apple.applescript.AppleScriptEngineFactory@3803641
getEngineName: AppleScriptEngine
getEngineVersion: 1.1
getLanguageName: AppleScript
getLanguageVersion: 2.3
getExtensions: [scpt, applescript, app]
getMimeTypes: [application/x-applescript, text/plain, text/applescript]
getNames: [AppleScriptEngine, AppleScript, OSA]
getScriptEngine: apple.applescript.AppleScriptEngine@555bf03d
com.sun.script.javascript.RhinoScriptEngineFactory@419829a9
package daemon;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class Foo {
public static void main(String... args) throws ScriptException {
ScriptEngineManager manager = new ScriptEngineManager();
Erasing Disk: 0%... 10%... 20%... 100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.
Done.
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/名称未設定 --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
@yusuke
yusuke / おめ.groovy
Created October 10, 2013 15:01
指定時刻に誕生日おめでとうメッセージをツイートするGroovyコード
import org.quartz.*
import org.quartz.impl.StdSchedulerFactory
import twitter4j.TwitterFactory
class バルスTask {
public void バルス() {
TwitterFactory.singleton.updateStatus("@mike_neck おめ"))
}
}