Skip to content

Instantly share code, notes, and snippets.

View deadblue's full-sized avatar
🐰
+1

Tomo Kunagisa deadblue

🐰
+1
View GitHub Profile
@deadblue
deadblue / main.cc
Last active March 28, 2022 07:27
C++ TreeNode
#include <iostream>
#include "tree_node.h"
using StringTreeNode = TreeNode<std::string>;
int main(int argc, char const *argv[]) {
auto root = std::make_shared<StringTreeNode>("");
auto a = root->Attach("a", "123");
a->Attach("x", "foo");
package ghost
import (
"reflect"
"testing"
)
type BarFunc func() int
type Foo struct{}
@deadblue
deadblue / OjbkHttp.kt
Last active November 27, 2019 05:50
OjbkHttp
import okhttp3.FormBody
import java.beans.Introspector
import java.lang.reflect.Method
object OjbkHttp {
@Target(AnnotationTarget.FIELD)
@Retention(AnnotationRetention.RUNTIME)
annotation class FormField (
val fieldName: String
@deadblue
deadblue / 996.py
Last active April 3, 2019 00:24
Script to fetch all users who stared one repository
# -*- coding: utf-8 -*-
__author__ = 'deadblue'
import logging
logging.basicConfig(
level=logging.INFO, datefmt='%H:%M:%S',
format='[%(asctime)s] %(message)s'
)
@deadblue
deadblue / cross_compile.sh
Last active March 28, 2018 14:01
Some useful bash script for me
# Script fragment of cross-compiling for Synology NAS
# cross compile toolchain installed at /opt/i686-pc-linux-gnu/
ln -s /opt/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-ar /usr/local/bin/i686-pc-linux-gnu-ar
ln -s /opt/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-c++ /usr/local/bin/i686-pc-linux-gnu-c++
ln -s /opt/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-cpp /usr/local/bin/i686-pc-linux-gnu-cpp
ln -s /opt/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-g++ /usr/local/bin/i686-pc-linux-gnu-g++
ln -s /opt/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-gcc /usr/local/bin/i686-pc-linux-gnu-gcc
ln -s /opt/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-gcc-ar /usr/local/bin/i686-pc-linux-gnu-gcc-ar
ln -s /opt/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-gcc-nm /usr/local/bin/i686-pc-linux-gnu-gcc-nm
@deadblue
deadblue / Sublime Text 2 Custom Layout Menu
Last active August 29, 2015 14:02
Main.sublime-menu
[
{
"id" : "view",
"children" : [
{
"id" : "layout",
"children" : [
{
"caption" : "Layout L1R2",
"command": "set_layout",