Skip to content

Instantly share code, notes, and snippets.

@timakin
timakin / .DS_Store
Last active August 29, 2015 14:21
timakin_board
@timakin
timakin / gist:34255f56dd5595cee421
Last active October 22, 2022 07:08
Gitのsubtreeについてのまとめ

前提

  • まとめた目的
    • プロジェクトのルートディレクトリにsubtree先を展開できないかなーという話を検証したので、その記録
      subtreedDir/
        /A
        /B
      とかがあるとき、それをsubtreeとして呼び出す、childプロジェクトがあるとする。このとき、
    

child/

@timakin
timakin / perform.rb
Last active August 29, 2015 14:24
Comparison of Performance: Instance and Hash, optionally with simple array.
class NewsFeed
attr_accessor :title, :memo
def initialize(title, memo)
@title = title
@memo = memo
end
def title
@title
end
そもそも サービスってなんやねん
- デーモンです
- デーモンって?
- バックグラウンドプロセスとして動作するプログラムを意味する。 ユーザーが直接対話的に制御するプログラムではない。
- へー。
- これをいろいろ扱えるのがdaemontoolsか。
@timakin
timakin / gist:6b5147ad2c1af80715d5
Created October 16, 2015 13:43
オレオレ証明書
$ openssl genrsa 2048 > server.key
$ openssl req -new -key server.key > server.csr
$ openssl x509 -days 3650 -req -signkey server.key < server.csr > server.crt
@timakin
timakin / interfacemap.go
Created May 11, 2016 15:55
map[string]interface{}{}
package main
import (
"fmt"
)
func main() {
test := make(map[string]interface{})
test["test"] = "yoyo"
tetete(test)
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
hash = {"some_key" => "value",
"nested" => {"key1" => "val1",
"key2" => "val2",
"key3" => {
"nenene" => "aa"
}}}
class Hash
def insert_before(key, kvpair)
@timakin
timakin / gist:1cb97f4ea9f1be5d28de9618feeec74c
Created October 5, 2016 06:54
decrypt private key in ruby
#!/usr/bin/env ruby
# DECRYPT
require 'openssl'
require 'base64'
private_key_file = 'private.pem';
password = 'boost facile'
<?xml version="1.0"?>
<root>
<item>
<name>Left</name>
<identifier>private.left</identifier>
<autogen>
__KeyToKey__ KeyCode::K, ModifierFlag::COMMAND_R, KeyCode::CURSOR_LEFT
</autogen>
</item>