Skip to content

Instantly share code, notes, and snippets.

View furu's full-sized avatar

furu furu

View GitHub Profile
package main
import (
"fmt"
"math/rand"
"os"
"os/signal"
"sync"
"syscall"
"time"
package main
import (
"fmt"
"log"
"net"
"os"
"os/signal"
"reflect"
"syscall"
@furu
furu / signal.pl
Created September 1, 2014 07:38
ใ‚ทใ‚ฐใƒŠใƒซใŒ้€ไฟกใ•ใ‚ŒใŸๅ ดๅˆใซใฏใ€ๅฎŸ่กŒไธญใฎๅ‡ฆ็†ใŒ็ต‚ไบ†ใ—ใฆ้€ไฟกใ•ใ‚ŒใŸใ‚ทใ‚ฐใƒŠใƒซใฎใƒใƒณใƒ‰ใƒฉใ‚’ๅ‡ฆ็†ใ—ใŸใ‚ใจใซใ•ใฃใ็ต‚ไบ†ใ—ใŸๅ‡ฆ็†ใฎใ‚ใจใฎๅ‡ฆ็†ใซๆˆปใ‚‹ใ€‚
use utf8;
use strict;
use warnings;
$SIG{'URG'} = sub {
print "Recieved URG signal\n";
};
print "hi\n";
@furu
furu / signal.go
Last active August 29, 2015 14:05
package main
import (
"fmt"
"log"
"net"
"os"
"os/signal"
"syscall"
"time"
package main
import (
"bufio"
"log"
"net"
"strings"
)
const RemoteAddress = "localhost"
@furu
furu / Rakefile
Created July 23, 2014 17:32
apache_log_analysis ใ‚‰ใ—ใ„ใ€‚ไฝ•ใ‹ใ‚ใฃใŸใ€‚
# coding: utf-8
require './access_log'
entries = []
task :load do
logfile = ENV["LOGFILE"] || "access_log"
puts "loading #{logfile}."
File.open(logfile) do |log|
AccessLog.each_entry(log) do |entry|
entries << entry
#!/bin/bash
# ๆ–‡ๅญ—ใ‚ณใƒผใƒ‰ใ‚’UTF-8๏ผŒๆ”น่กŒใ‚ณใƒผใƒ‰ใ‚’LFใซๅค‰ๆ›ใ™ใ‚‹
# nkfใ‚ณใƒžใƒณใƒ‰ใŒๅฟ…่ฆ
if [ $# = 0 ]; then
echo "usage: win2unix filename"
exit 1
fi
@furu
furu / ltdd-4-editorconfig.md
Created June 12, 2014 15:06
https://speakerdeck.com/pecosantoyobe/editorconfig-falseshao-jie-wosurudake ใ‚’ไฝœใ‚‹ๅ‰ใซๆ›ธใ„ใŸใƒกใƒข

EditorConfig ใฎ็ดนไป‹ใ‚’ใ™ใ‚‹ใ ใ‘ - LT้ง†ๅ‹•้–‹็™บ 04

EditorConfig

  • ใ‚ญใƒฃใƒฉใ‚ฏใ‚ฟใƒผใŒ็œผ้ก้ผ 
  • ็Ÿฅๆ€งใ‚’ๆ„Ÿใ˜ใ‚‹
  • ๅๅ‰ไฝ•ใชใ‚“ใ ใ‚ใ†
  • ็•ฐใชใ‚‹ใ‚จใƒ‡ใ‚ฃใ‚ฟใƒผใ‚„ IED ้–“ใงใฎไธ€่ฒซๆ€งใฎใ‚ใ‚‹ใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚นใ‚ฟใ‚คใƒซใ‚’ๅฎš็พฉใ—ใƒกใƒณใƒ†ใƒŠใƒณใ‚น
<?php
if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_SERVER['REQUEST_URI'])) {
return false;
}
include $_SERVER['DOCUMENT_ROOT'] . '/index.php';
#!/Users/furu/Gentoo/bin/bash
# Copyright 2006-2014 Gentoo Foundation; Distributed under the GPL v2
# $Id: startprefix.in 61219 2012-09-04 19:05:55Z grobian $
# Fabian Groffen <[email protected]> -- 2007-03-10
# Enters the prefix environment by starting a login shell from the
# prefix. The SHELL environment variable is elevated in order to make
# applications that start login shells to work, such as `screen`.
# if you come from a substantially polluted environment (another