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
#include <errno.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define UTF8_BOM "\xef\xbb\xbf" | |
#define UTF16BE_BOM "\xfe\xff" | |
#define UTF16LE_BOM "\xff\xfe" | |
#define UTF7_BOM "\x2b\x2f\x76" |
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 ruby | |
# -*- encoding: utf-8; -*- | |
RE_PART = /^([A-Z]+)\s?(.*)$/ | |
filename = ARGV.shift | |
File.open(filename, "rb:Shift_JIS") do |file| | |
while line = file.gets do | |
line.chomp! |
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
class Strip < Liquid::Block | |
def initialize(tag_name, markup, tokens) | |
super | |
end | |
def render(context) | |
super.split(/\r?\n/).map{|line| line.strip }.join("") | |
end | |
end |
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/config.ru b/config.ru | |
index 0b174f0..0ae477e 100644 | |
--- a/config.ru | |
+++ b/config.ru | |
@@ -6,7 +6,7 @@ require 'sinatra' | |
set :environment, ENV["RACK_ENV"].to_sym | |
disable :run, :reload | |
-require_relative "irclog_app" | |
+require "./irclog_app" |
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
#include <errno.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#define ATTR_PACKED __attribute__((packed)) | |
#define P_DAT_SIGNATURE "GAMEDAT PAC2" |
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
SELECT | |
p.id, | |
p.starttime, | |
p.endtime, | |
ch.name, | |
p.title, | |
p.description | |
FROM | |
Recorder_programTbl p, | |
Recorder_categoryTbl cat, |
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
javascript:$("<textarea>").val($(".user-photo a img").map(function(i,e){return $(e).attr("src").replace(/photos\/thumb/, "photos/large");}).get().join("\r\n")).prependTo($(".sidebar-section")) |
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 ruby | |
# -*- encoding: utf-8; -*- | |
require 'rubygems' | |
require 'webrick' | |
require 'webrick/httpproxy' | |
require 'uri' | |
OPTIONS = { | |
:BindAddress => '0.0.0.0', |
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
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
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 ruby | |
require 'nkf' | |
RE_SUBJECT = /^\s*Subject: (.*)$/i | |
RE_ENC = /=\?(.*?)\?([bBqQ])\?(.*)(\?=)?/ | |
while line = ARGF.gets do | |
line.chomp! |
OlderNewer