Skip to content

Instantly share code, notes, and snippets.

package pi;
import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Pi090314 {
private static final BigInteger B0 = new BigInteger("0");
private static final BigInteger B1 = new BigInteger("1");
#!/opt/local/bin/ruby -Ku
# -*- coding: utf-8 -*-
require 'rubygems'
require 'nicovideo'
require 'pit'
require "kconv"
#########################################
## iphone用変換コマンド(Mac用かも・・・)
#########################################
--- pty.c 2003-09-08 23:26:18.000000000 +0900
+++ pty.c 2010-11-11 20:17:05.000000000 +0900
@@ -33,11 +33,6 @@
# include <sys/ioctl.h>
#endif
-/* for solaris 2.1, Unixware (SVR4.2) and possibly others */
-#ifdef HAVE_SVR4_PTYS
-# include <sys/stropts.h>
-#endif
Index: configure.in
===================================================================
RCS file: /sources/emacs/emacs/configure.in,v
retrieving revision 1.575
diff -u -u -r1.575 configure.in
--- configure.in 7 Nov 2008 06:56:39 -0000 1.575
+++ configure.in 12 Nov 2008 14:56:06 -0000
@@ -1274,10 +1274,10 @@
with_xft=no
with_freetype=no
@Echos
Echos / pdftk.rb
Created March 3, 2012 02:29
Homebrew PDFTK for OSX Lion
require 'formula'
class Pdftk < Formula
url 'http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.44-src.zip'
homepage 'http://www.pdflabs.com/'
md5 '9eb50fffcd621a627d387750c60982b4'
depends_on 'gcc' # with "--enable-java" option , required "Homebrew-alt" .
# via : https://github.com/adamv/homebrew-alt/
def install
@Echos
Echos / hyperestraier.rb
Last active October 3, 2015 07:38
HyperEstraier for Homebrew
require 'formula'
class Hyperestraier <Formula
url 'http://fallabs.com/hyperestraier/hyperestraier-1.4.13.tar.gz'
homepage 'http://fallabs.com/hyperestraier/'
md5 '133305e54785a93b25f4e2f7b421e80d'
depends_on 'qdbm'
depends_on 'libiconv'
depends_on 'zlib'
@Echos
Echos / data_migration_for_mongo.sh
Created September 24, 2012 17:38
MongoXXX -> MongoYYY
#!/bin/bash
MONGO1_HOST=XXXXXXXXXX
MONGO1_PORT=XXXXXXXXXX
MONGO1_USER=XXXXXXXXXX
MONGO1_PASS=XXXXXXXXXX
MONGO1_DB_NAME=XXXXXXXXXX
MONGO2_HOST=YYYYYYYYYY
MONGO2_PORT=YYYYYYYYYY
MONGO2_USER=YYYYYYYYYY
@Echos
Echos / fix-user-delete.patch
Created October 15, 2012 13:10
Massr用ユーザ削除機能復元パッチ
diff --git public/js/default.js public/js/default.js
index 92b0891..3a0f63d 100644
--- public/js/default.js
+++ public/js/default.js
@@ -337,21 +337,6 @@ $(function(){
});
/*
- * delete user by myself
- */
@Echos
Echos / .vromerc
Last active October 12, 2015 07:48
configration for vrome
" "" .vromerc example file
" Change key mapping in normal mode, please check Vrome Features for available key mapping
" map j <C-f>
map j 10j
map k 10k
" traverse tabs
map <C-j> gt
diff --git a/public/js/default.js b/public/js/default.js
index c2d6785..6dd6248 100644
--- a/public/js/default.js
+++ b/public/js/default.js
@@ -409,9 +409,10 @@ $(function(){
*/
$('#new-res-notice-text').each(function(){
var notice = $(this);
+ var link = $('a',this);
var notice_count = notice.text().match(/\d+/);