Skip to content

Instantly share code, notes, and snippets.

View ne-sachirou's full-sized avatar

さっちゃん ne-sachirou

View GitHub Profile
@ne-sachirou
ne-sachirou / fractran.clj
Last active March 8, 2024 18:40
FRACTRAN
(ns prime
(:require
[clojure.math :as math]))
;; エラトステネスの篩で素數列を生成する
(deftype Primes
[prime numbers]
clojure.lang.ISeq
@ne-sachirou
ne-sachirou / ExecuteNonQuery.aspx.cs
Created July 6, 2012 03:39
ASP.NET C# and MySQL example
using System;
using MySql.Data.MySqlClient;
namespace insert
{
public class User
{
public string ID;
public string Name;
public string Pass;
@ne-sachirou
ne-sachirou / es5.js
Created June 10, 2011 14:36
Define ES5 extention by ES3 #js
/**
* @preserve Public Domain 2011 ne_Sachirou
* author: ne_Sachirou http://c4se.tk/profile/ne.html
* site: http://gist.github.com/1018954
* date: 2011 - 2012
* license: Public Domain
*/
//java -jar compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --js_output_file es5.min.js --js es5.js --js json2.js
@ne-sachirou
ne-sachirou / unzip.js
Created March 27, 2011 23:46
Simple unzip by Ruby and by JScript.
// http://d.hatena.ne.jp/hetappi/20080819/1219157144
function unzip(zipfile, // @param String: Zipped file path
unzipdir) { // @param String: Unzip target directory path
var fso = new ActiveXObject('Scripting.FileSystemObject'),
shell = new ActiveXObject('Shell.Application'),
dst, zip;
if (!unzipdir) {
unzipdir = '.';
}
@ne-sachirou
ne-sachirou / Annotation.md
Created December 13, 2016 08:44 — forked from kakutani/Annotation.md
Raw Gemfile on Idobata (master - 5adeddb)

Idobata Gemfile プレゼント

tl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile

プレゼントについてのお詫び

rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)

@ne-sachirou
ne-sachirou / http2_study_client.ex
Created May 27, 2014 07:38
Try to implement HTTP2 client in Elixir.
defmodule Http2StudyClient do
@moduledoc """
http2study
"""
@doc "GET HTTP/2.0"
def get domain, port do
{:ok, sock} = :gen_tcp.connect domain, port, [:binary, {:packet, 0}]
try do
{:ok, data} = send_connection_preface sock
@ne-sachirou
ne-sachirou / xorshift.js
Created March 3, 2011 04:22
Xorshift random on JavaScript #js
// @license = public domain
// =Usage
// Number = Xorshift.random();
//
// var xor128 = Xorshift.init();
// Array = xor128.make(1000000);
(function() {
@ne-sachirou
ne-sachirou / Math.uuid.js
Created March 22, 2011 22:08
Math.uuid.js #js
// Copyright (c) 2010 Robert Kieffer
// http://www.broofa.com
// mailto:robert@broofa.com
// Copyright (c) 2011 http://c4se.sakura.ne.jp/profile/ne.html
// Dual licensed under the MIT and GPL licenses.
(function() {
var CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''),
random;
@ne-sachirou
ne-sachirou / task07_db33_10406.sql
Created January 17, 2014 01:17
OracleDB 11g PL/SQL 例文 (memo用)
set serveroutput on;
drop table w_tmp;
create table w_tmp (
department_id number(4),
employee_id number(6),
department_name varchar2(30),
salary number(8, 2),
bonus number(8, 2),
employee_name varchar2(46),
@ne-sachirou
ne-sachirou / .gitignore
Last active December 29, 2015 19:28
private/protected/static of JavaScript class http://c4se.hatenablog.com/entry/2015/12/29/050124
node_modules/