Skip to content

Instantly share code, notes, and snippets.

@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 / main.go
Created March 6, 2016 08:44
golangでファイルへの保存と読み出しテスト
package main
import (
"fmt"
"io/ioutil"
// "os"
// "net/http"
// "time"
)
@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 / 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 / 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 / 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 / README.md
Last active January 14, 2016 00:33
yahoo apiを使って、文章を日本語形態素解析をおこなうスクリプト

最初に

このスクリプトを動作させるには、2つのライブラリのインストールが必要です。

  • beautifulsoup4
  • lxml

インストール方法

#!/bin/sh
nasm -f bin -o hello.bin hello.asm
dd conv=notrunc if=hello.bin of=cd.cdr
@akkijp
akkijp / main.cs
Created December 21, 2015 18:40
Hello World C#
using System;
class HelloWorld {
public static void Main( )
{
Console.WriteLine("hello world");
}
}
@akkijp
akkijp / gist:07fa9793441adf4ba71a
Created December 15, 2015 08:05 — forked from hokaccha/gist:58594
wordbreak.js for jQuery
$(function(){
var $targetElement = '.wordBreak';
if($.browser.msie) {
$($targetElement).css('word-break', 'break-all');
} else {
$($targetElement).each(function(){
if(navigator.userAgent.indexOf('Firefox/2') != -1) {
$(this).html($(this).text().split('').join('<wbr />'));
} else {
$(this).html($(this).text().split('').join(String.fromCharCode(8203)));