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 / 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 / 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),
<!DOCTYPE html>
<!-- lisence: Public Domain -->
<meta charset="UTF-8">
<title>ASync Life game</title>
<style>
.container_20130928_1 {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
@ne-sachirou
ne-sachirou / .gitignore
Last active December 19, 2015 04:49
Calendar generator for mitsui. RubyにカレンダーっぽいHTMLを吐き出さすまで物語 - c4se記:さっちゃんですよ☆ http://c4se.hatenablog.com/entry/2013/07/01/193049
.bundle/
vendor/
@ne-sachirou
ne-sachirou / Flow.html
Last active December 18, 2015 12:09
Minimal async flow controller. Like uupaa's Flow.js https://github.com/uupaa/flow.js
java -jar _resources/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --language_in ECMASCRIPT5 --js public/javascripts/Flow.js --js_output_file public/javascripts/Flow.min.js
<script src="Flow.js"></script>
<script>
/**
* @param {boolean=} is_missable =false
* @return {Flow}
*/
function genFlow(is_missable) {
return new Flow(2,
function(err, passes) {
@ne-sachirou
ne-sachirou / which.bat
Last active December 15, 2015 08:18
*nix `which` command on Windows (need Ruby).
@echo off
rem setlocal
rem for %%t in (%1) do echo,%%~$path:t
rem for %%e in (%pathext%) do (
rem for %%t in (%1%%e) do echo,%%~$path:t
rem )
rem endlocal
ruby -x %~f0 %*
@goto end
@ne-sachirou
ne-sachirou / trim_psd.py
Created February 16, 2013 22:23
Trim Photoshop files and save them into PNG files, on GIMP Python-Fu. (part of a project at Ranyuen)
"""Trim Photoshop files and save them into PNG files, on GIMP Python-Fu.
author: ne_Sachirou <utakata.c4se@gmail.com>
date: 2013/02/12
license: Public Domain
GIMP 2.8.0, Python 2.7.2
For syntax check, ``python -m py_compile trim_psd.py``.
"""
import platform
@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 / replyAll.js
Created April 15, 2012 13:50
replyAll.js #AzureaScript
/**
* @fileOverview ちゅーんさま用。Azureaのreply all。
* 自作の[ES5.js https://gist.github.com/1018954 ]を使いました。
* 昔のAzureaVimでは、簡易templeteエンジン組んでこんな[ https://github.com/ne-sachirou/AzureaVim/blob/azvm1/src/plugins/reply.js ]風に書いてました。master blanchにはrelpy pluginはありません。
* 因みにAzureaVimは、AzureaのAPI変更に追随していないのでもう動きません。
*/
if (!Array.prototype.indexOf) {
/**
* @param val Object
@ne-sachirou
ne-sachirou / solve.html
Created November 25, 2011 13:33
Puzzle solver example on Ruby.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>puzzle</title>
</head>
<body>
<div id="puzzle">
<input type="button" class="puzzlebutton" value="0" />
<input type="button" class="puzzlebutton" value="1" />