Skip to content

Instantly share code, notes, and snippets.

@sasamijp
sasamijp / wailangwiki.rb
Created August 23, 2015 12:39
html内にある日本語の固有名詞をわいに置換する
# -*- encoding:utf-8 -*-
require 'natto'
require 'open-uri'
@natto = Natto::MeCab.new
def conv(jp_text)
words = []
jp_text.split("\n").map do |text|
@Nucleareal
Nucleareal / msort.cs
Created July 18, 2015 17:25
ふあすぷちゃんのをパクったマージソート
using System;
using System.Collections.Generic;
using System.Linq;
namespace Test
{
class Program
{
public static LinkedList<T> mergeList<T>(LinkedList<T> lList, LinkedList<T> rList, Comparison<T> cmp)
{
@cobodo
cobodo / lifegame.svg
Last active August 29, 2015 14:22
昔書いたやつ。最終更新は 2008-05-22 00:53:58。"ASV"はAdobe SVG Viewerプラグインのこと。
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sasamijp
sasamijp / name.csv
Last active August 19, 2018 14:28
update_nameによって蓄積された名前ログ
sasamijp 2014-03-24 23:08:33 +0900 448099043776794625
おしり sasamijp 2014-03-25 08:58:06 +0900 448247409835913216
おしりターボ firstspring1845 2014-03-25 08:58:31 +0900 448247511027695616
極左 NTTrf 2014-03-25 09:35:42 +0900 448256867165159424
アナル sasamijp 2014-03-25 10:04:17 +0900 448264063898746881
菊地真はホモ 1kaguya 2014-03-25 10:04:44 +0900 448264173814702080
ちんちん sasamijp 2014-03-25 10:11:35 +0900 448265900936798209
sasamijp 2014-03-25 10:40:12 +0900 448273101990555649
アナル sasamijp 2014-03-25 16:28:21 +0900 448360718526447616
ちんちん sasamijp 2014-03-25 17:07:55 +0900 448370672822013952
@lacolaco
lacolaco / bbop_test.go
Last active August 29, 2015 14:05
bbop in golangのテストコード
package la0c
import (
"strings"
"testing"
)
func TestCalcMatchCount(t *testing.T) {
noMatch := "レ,ド,ッ,ビ,ビ,ッ,レ,・,レ,ビ,ビ,ー,ド,ン"
if CalcMatchCount(strings.Split(noMatch, ",")) != 0 {
@lacolaco
lacolaco / bbop.go
Created August 13, 2014 03:53
bbop in golang
package la0c
import (
"math/rand"
"strconv"
"strings"
)
const (
ANSWER = "ビ,ビ,ッ,ド,レ,ッ,ド,・,オ,ペ,レ,ー,ショ,ン"
@Getaji
Getaji / Main.java
Created July 28, 2014 15:54
Scannerで改行をそのまま入れるよ! 速度は知らん。→計測したところ、改行文字を手動挿入するのと同じか若干早い模様です。やったね。
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
Scanner scanner = new Scanner(new FileInputStream("src/sample.txt")).useDelimiter(Pattern.compile("^"));
StringBuilder builder = new StringBuilder();
while (scanner.hasNext()) {
builder.append(scanner.next());
@ikr7
ikr7 / glitch.js
Last active August 29, 2015 14:02
Glitch画像作るやつ
var fs = require('fs');
var inImageData = false;
var o = Math.random() * 255 | 0,
r = Math.random() * 255 | 0;
var orig = fs.readFileSync('./original.jpg'),
glit = new Buffer(orig.length);
(defn fizzbuzz [x]
(cond
(= (rem x 15) 0) "FizzBuzz"
(= (rem x 3) 0) "Fizz"
(= (rem x 5) 0) "Buzz"
:else (str x)
)
)
(doseq [p (map fizzbuzz (range 1 100))] (println p))
@shibafu528
shibafu528 / ebi_beam.rb
Last active August 29, 2015 13:57 — forked from firstspring1845/java_beam.rb
千葉県に謝罪の意を込めて
# -*- coding: utf-8 -*-
Plugin.create :ebi_beam do
command(:ebi_beam,
name: 'エビビーム',
condition: lambda{ |opt| true},
visible: false,
role: :window) do |opt|
Service.primary.post(:message => 'エビビームビビビビビビビwwwwwwwwww')
end
end