Skip to content

Instantly share code, notes, and snippets.

View ifukazoo's full-sized avatar

ifukazoo ifukazoo

View GitHub Profile
@ifukazoo
ifukazoo / cargo.toml
Created February 24, 2020 08:30
rust example
[package]
name = "serialapi"
version = "0.1.0"
authors = ["ifukazoo <ifukazoo@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
libc = "*"
[package]
name = "webexample"
version = "0.1.0"
authors = ["ifukazoo <ifukazoo@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tower-web = "*"
@ifukazoo
ifukazoo / FileInfo.cs
Created October 8, 2018 07:36
write fileversion to csv format file.
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
namespace FileInfos
{
class Program
{
@ifukazoo
ifukazoo / unique_ptr.cc
Last active July 8, 2018 08:50
unique_ptr sample
#include <iostream>
#include <memory>
class A {
public:
explicit A() { std::cout << __func__ << std::endl; }
~A() { std::cout << __func__ << std::endl; }
virtual void print() { std::cout << this << std::endl; }
};
@ifukazoo
ifukazoo / createfunction.sql
Created October 1, 2017 02:28
PostgreSQL関数の登録
create function uncomplicate(text) returns varchar as $$
select
sub.a
|| sub.b
|| sub.c
|| sub.d
|| sub.e
|| sub.f
|| sub.g
|| sub.h
@ifukazoo
ifukazoo / create.sql
Last active September 3, 2017 08:00
カラムの暗号化
create table enctest (
id serial not null primary key,
password bytea not null,
key bytea not null
)
;
@ifukazoo
ifukazoo / escanner.go
Last active June 18, 2017 07:27
プログラミング出題サイト用
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
@ifukazoo
ifukazoo / slicemap.go
Created May 14, 2017 02:30
goのslice,mapを引数にする場合の挙動
package main
import "fmt"
func f(m map[string]int) map[string]int {
// 呼び出し元も変更
m["a"]++
m["b"]++
return m
}
package stringmisc
import (
"fmt"
"unicode/utf8"
)
func stringリテラル() {
// ユニコードポイント
// 世 :Unicode 0x4e16
@ifukazoo
ifukazoo / crontabparse.go
Created March 28, 2017 00:15
crontab形式のパース
package main
import (
"bufio"
"errors"
"fmt"
"os"
"sort"
"strconv"
"strings"