Skip to content

Instantly share code, notes, and snippets.

View snipsnipsnip's full-sized avatar

Satoshi Kodama snipsnipsnip

View GitHub Profile
@snipsnipsnip
snipsnipsnip / cl.go
Last active December 16, 2015 22:39
なんか落ちる (GoでOpenCLテスト)
package main
// #include "CL/opencl.h"
// #cgo LDFLAGS: -lOpenCL
import "C"
import (
"log"
"unsafe"
)
@snipsnipsnip
snipsnipsnip / _usage.vcxproj.xml
Last active December 15, 2015 17:59
ziptask.vcxproj.xml
<Target Name="CreateZip" AfterTargets="Build" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PropertyGroup>
<StringDate>$([System.DateTime]::Now.ToString('yyyyMMdd-HH-mm-ss'))</StringDate>
</PropertyGroup>
<ItemGroup>
<ReleaseFiles Include="Release\*exe*">
<StripPath>true</StripPath>
</ReleaseFiles>
<ReleaseFiles Include="README.txt;data\**\*" Exclude="**\.svn\**\*"/>
<ReleaseFiles Include="*.vcxproj;*.sln;*.cpp;*.h;include\**\*" Exclude="**\.svn\**\*">
@snipsnipsnip
snipsnipsnip / lua_5.2_amalgamation.c
Created March 20, 2013 10:47
lua 5.2 amalgamation (as an embedded interpreter)
#define LUA_LIB
#define ltable_c
#include "lobject.c"
#include "lapi.c"
#include "lcode.c"
#include "lctype.c"
#include "ldebug.c"
#include "ldo.c"
#include "ldump.c"
#include "lfunc.c"
@snipsnipsnip
snipsnipsnip / xls2csv.exe
Last active December 12, 2015 07:48
win32oleつかってxlsをcsvに変換
@snipsnipsnip
snipsnipsnip / http.diff
Created December 19, 2012 22:26
logwatch http diff: print IP address
--- /usr/share/logwatch/scripts/services/http 2012-12-19 17:22:31.000000000 +0900
+++ /usr/share/logwatch/scripts/services/http.orig 2011-03-31 06:57:37.000000000 +0900
@@ -136,6 +136,7 @@
my %hack_success =();
my %needs_exam =();
my %ban_ip =();
+my %ip_per_url =();
my %robots =();
my $pattern = "";
my $flag = 0;
@snipsnipsnip
snipsnipsnip / laptop.ahk
Created November 28, 2012 01:57
laptop.ahk
;; ahk settings for laptop with jp keyboard
;muhenkan
sc07b::Home
;henkan
sc079::End
;the key at the left of the lshift key
sc073::_
@snipsnipsnip
snipsnipsnip / ics.cs
Created November 12, 2012 16:14
ics.cs is a C# repl
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.CSharp;
using System.CodeDom.Compiler;
using System.Reflection;
using System.IO;
namespace ics
{
@snipsnipsnip
snipsnipsnip / dotdep.rb
Last active September 28, 2018 11:55
dotdep.rb prints source code dependency in dot format
# frozen_string_literal: true
require 'optparse'
require 'set'
class Dep
def self.main(argv=ARGV)
dep = new
froms = []
tos = []
@snipsnipsnip
snipsnipsnip / rakeloop.sh
Created October 17, 2012 10:47
one-liner to repeat rake
ruby -rubygems -e "require 'rake'; loop { STDIN.gets or break; Rake.application.run }"
@snipsnipsnip
snipsnipsnip / rakefile.rb
Created October 17, 2012 03:30
Desugaring rakefile (.sass => .css, .coffee => .js, .slim => .html)
require 'tilt'
require 'slim'
require 'sass'
require 'rake/clean'
@tilts = {}
def tilt_rule(to, from, options={})
@tilts[from] = to