Skip to content

Instantly share code, notes, and snippets.

@akkijp
akkijp / aws-ec2-showip.rb
Created November 17, 2015 03:18
aws ec2 のpublic ipを表示させる
require 'aws-sdk-core'
config = {
:region => "ap-northeast-1"
}
client = Aws::EC2::Client.new(
region: config[:region],
)
resp = client.describe_instances({
@akkijp
akkijp / README.md
Last active November 20, 2015 19:02

nginx-gui

install

test

node install

function Observer(){
this.listeners = {};
}
Observer.prototype.on = function(event, func) {
if(!this.listeners[event]){
this.listeners[event] = [];
}
this.listeners[event].push(func);
};
Observer.prototype.off = function(event, func) {
@akkijp
akkijp / gfm2html.md
Created December 2, 2015 20:34 — forked from t-nissie/gfm2html.md
手もとでGFMファイルをHTMLファイルに変換する簡単なRubyスクリプトgfm2html.rb

gfm2html.rb

手もとでGFM (GitHub Flavored Markdown) ファイルをHTMLファイルに変換する簡単なRubyスクリプトgfm2html.rbを下に置きました。 github-markdownを用いています。 google-code-prettifyを使えばsyntax highlightができることが特徴です。 簡単なCSSファイルを用意して使います。例としてstyle.cssが下に置いてあります。

この文章は Gist https://gist.github.com/t-nissie/c415b7da3a694e82d6b5 に置いてあります。 git clone [email protected]:c415b7da3a694e82d6b5.git gfm2htmlでクローンできます。

@akkijp
akkijp / HowToGist.md
Created December 2, 2015 20:34 — forked from t-nissie/HowToGist.md
Gistの使い方のメモ

Gistの使い方のメモ

Gistを使い始めて気がついた点をメモした。 Gistはこのようなメモや短いコードをバージョン管理しながら公開するのに便利。

特にこのメモでは、画像を同一ディレクトリに置いて、 それGFMファイル内に挿入する方法を解説。

このメモにはgitコマンドの使い方の解説はない。 このメモは随時更新される予定。

@akkijp
akkijp / hello.swift
Created December 5, 2015 23:56
hello world swift
var helloWorld :String = "Hello World swift!"
print(helloWorld)
@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)));
@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");
}
}
#!/bin/sh
nasm -f bin -o hello.bin hello.asm
dd conv=notrunc if=hello.bin of=cd.cdr
@akkijp
akkijp / README.md
Last active January 14, 2016 00:33
yahoo apiを使って、文章を日本語形態素解析をおこなうスクリプト

最初に

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

  • beautifulsoup4
  • lxml

インストール方法