Skip to content

Instantly share code, notes, and snippets.

@oquno
oquno / onclick_saiyou.php
Created February 2, 2012 08:55
ワンクリック採用.php
<?php
$recruited = false;
if ($_POST["saiyou"])
{
$host = gethostbyaddr(getenv("REMOTE_ADDR"));
$fp = fopen("/path/to/entries", "a");
fwrite($fp, "\n".date("Y-m-d H:i:s")."\t".$host);
fclose($fp);
$recruited = true;
}
@oquno
oquno / mobilepoint.user.js
Created January 29, 2012 23:55
auto-login to mobilepoint
// ==UserScript==
// @name auto-login to mobilepoint
// @namespace http://oq.la/
// @include https://www.login3.w-lan.jp/signup/Login*
// ==/UserScript==
var form = document.forms[0];
form.UserName.value = "[email protected]";
form.Password.value = "PASSWORD";
form.submit();
Test Summary Report
-------------------
t/date.t (Wstat: 256 Tests: 227 Failed: 1)
Failed test: 54
Non-zero exit status: 1
Files=3, Tests=233, 0 wallclock secs ( 0.06 usr 0.01 sys + 0.17 cusr 0.03 csys = 0.27 CPU)
Result: FAIL
Failed 1/3 test programs. 1/233 subtests failed.
make: *** [test_dynamic] エラー 1
-> FAIL Installing Date::Simple failed. See /home/oquno/.cpanm/build.log for details.
Opera Preferences version 2.1
; Do not edit this file while Opera is running
; This file is stored in UTF-8 encoding
[Version]
File Version=1
[Info]
Description=Opera 9.2 Compatible Keyboard setup
Author=Opera Software ASA
@oquno
oquno / iradio_downloader.py
Created September 2, 2011 00:00
i-Radio downloader
# usage: $ python iradio_downloader.py "http://www2.i-radio.fm/i-radio/program/clammbon/223/wmp.asx" "gomamiso_223.mp3"
import sys, os
from urllib2 import urlopen
from BeautifulSoup import BeautifulStoneSoup
def save_mms(url, filename):
command = 'mimms "%(url)s" "%(filename)s"' % { 'url': url, 'filename': filename }
print command
os.system(command)
return