Skip to content

Instantly share code, notes, and snippets.

@ToQoz
ToQoz / git-first-implementation-message.md
Created January 27, 2014 07:08
git init -> git commit --allow-empty -> (work) -> here!!!
  • The sunrise on New Year's Day.
  • Rough sketch.
  • Get pregnancy.
@ToQoz
ToQoz / 0_README
Last active October 24, 2023 15:22
Cmd-Z -> Undo, Cmd-Shift-Z -> Redo in zsh. 1. bindkey in zsh 2. remap in keyremap4macbook
Cmd-Z -> Undo, Cmd-Shift-Z -> Redo in zsh.
1. bindkey in zsh
2. remap in keyremap4macbook
// typedef void (^TQAPIHTTPRequestSuccessHandler)(AFHTTPRequestOperation *operation, id responseObject);
// typedef void (^TQAPIHTTPRequestFailureHandler)(AFHTTPRequestOperation *operation, NSError *error);
NSString *path = <#path#>;
NSDictionary *params = <#params#>;
// ↓ OR define custom type and use it. e.g. TQAPIHTTPRequestSuccessHandler successHandler = ...
void (^successHandler)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
if (block) { block(responseObject, nil); }
};
require 'curses'
def ensure_stdout_isatty
isatty = STDOUT.isatty
unless isatty
stdout_old = STDOUT.dup
STDOUT.reopen('/dev/tty')
end
package main
import (
"errors"
"fmt"
"reflect"
)
var SimpleValidationError = errors.New("Validation error")
package main
import (
"flag"
"fmt"
"os"
)
func usage() {
banner := `toqoz is useless tool
var favicon = {
retryCount: 0,
retryLimit: 10,
change: function(url, cond) {
if (cond()) {
if (this.node().href != url) {
this.node().href = url;
// 後で書き換えられることもあるので適当にリトライする
setTimeout(function() {
# Fork from http://qiita.com/ayakix/items/3f05da9541b8e130e39f
##### Uncrustify config
### Preprocessor
## http://qiita.com/items/dd7c5ffdff27451dae16
# #if、#ifdef、#ifndef〜#else〜#endifブロック内のプロプロセッサをインデントするかどうか。{ ignore, add, remove, force }
pp_indent = add
# ソースコードのインデントレベルに合わせてインデントするかどうか。{ true, false }
pp_indent_at_level = true
@ToQoz
ToQoz / 1_create_post.go
Last active December 27, 2015 07:09
どっちがだるいか分からなくなってきた
package migrations
import (
"github.com/ToQoz/scheman"
)
type createPost struct {}
func (c *createPost) up(migrator *scheman.Migrator) {
migrator.CreateTable("posts", func(table *scheman.Table) {