Skip to content

Instantly share code, notes, and snippets.

@akkijp
akkijp / signal.rb
Created February 20, 2016 14:59
株の分析関数群
#!/usr/bin/env ruby
# from https://raw.githubusercontent.com/unageanu/jiji/master/base/shared_lib/system/signal.rb
module Signal
#===一定期間のレートデータを元に値を算出するシグナルの基底クラス
class RangeSignal
include Signal
#====コンストラクタ
#range:: 集計期間
def initialize( range=25 )
@akkijp
akkijp / ls.c
Created March 3, 2016 20:15
lsコマンドを作ってみた
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <dirent.h>
static void do_ls(char *path){
DIR *d;
struct dirent *ent;
d = opendir(path);
@akkijp
akkijp / check_ip_address.go
Created March 4, 2016 09:36
check_ip_address
package main
import (
"log"
"github.com/miekg/dns"
)
func main() {
target := "getd.xyz"
@akkijp
akkijp / android-backup.sh
Created March 4, 2016 09:37
android-backup
formatted_date () {
date "+%Y%m%d%H%M"
}
zip_file_name=LINE_Backup_`formatted_date`.zip
adb -s CB5A25CFNW pull /sdcard/LINE_Backup/ /tmp/LINE_Backup/ && \
zip -r /tmp/$zip_file_name /tmp/LINE_Backup && \
mv /tmp/$zip_file_name /Users/YOUR_HOME_DIR/Dropbox/40-Archive/LINE_Backup/
# mv /tmp/$zip_file_name /Users/YOUR_HOME_DIR/Desktop/
@akkijp
akkijp / main.go
Created March 6, 2016 08:44
golangでファイルへの保存と読み出しテスト
package main
import (
"fmt"
"io/ioutil"
// "os"
// "net/http"
// "time"
)
@akkijp
akkijp / RFC 1034.md
Created March 24, 2016 17:36
RFC 1034.md

[RFC 1034] DOMAIN NAMES - CONCEPTS AND FACILITIES 「ドメイン名 - 概念と機能」

1. STATUS OF THIS MEMO 「この文書の状態」

This RFC is an introduction to the Domain Name System (DNS), and omits many details which can be found in a companion RFC, "Domain Names - Implementation and Specification" [RFC-1035]. That RFC assumes that the reader is familiar with the concepts discussed in this memo. このRFCはドメインネームシステム(DNS)の紹介であり、関連するRFC「ドメイン名-実装と仕様書」[RFC-1035]に記載してる細部は書いていません。RFC1035は読者がこのメモで論じた概念に精通していると想定します。

A subset of DNS functions and data types constitute an official protocol. The official protocol includes standard queries and their responses and most of the Internet class data formats (e.g., host addresses).

@akkijp
akkijp / build.sh
Last active April 5, 2016 05:43
OpneCVをビルドした時のエラーログと、ビルドに成功した時のコマンド
#!/bin/sh
g++ `pkg-config --cflags opencv` -lopencv_core -lopencv_highgui -lopencv_imgproc version_cv.cpp `pkg-config --libs opencv`
@akkijp
akkijp / gemlist.txt
Created April 5, 2016 05:41
自分のコンピュータにインストールされていた、gemリストと、既存のgemを全アンインストールするスクリプト
actionmailer (4.2.4, 4.2.2)
actionpack (4.2.4, 4.2.2, 4.2.1)
actionview (4.2.4, 4.2.2, 4.2.1)
activejob (4.2.4, 4.2.2)
activemodel (4.2.4, 4.2.2, 4.2.1)
activerecord (4.2.4, 4.2.2)
activesupport (4.2.4, 4.2.2, 4.2.1)
addressable (2.3.8)
arel (6.0.3)
ast (2.2.0, 2.1.0)
@akkijp
akkijp / delete-heroku-apps.sh
Created April 10, 2016 11:30 — forked from naaman/delete-heroku-apps.sh
Delete all heroku apps from bash terminal -- no script file required
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done
@akkijp
akkijp / pip-upgrade-all.zsh
Last active April 14, 2016 12:39
pip pip3 関連のパッケージを一括アップグレードするスクリプト
alias pip-upgrade-all="pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U"
alias pip3-upgrade-all"pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip3 install -U"