Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🍖

niku niku

💭
🍖
View GitHub Profile
@niku
niku / go.mod
Last active Dec 21, 2021
Make buckets has no object even if the bucket is versioning-enabled
View go.mod
module niku/cleanup-version-enabled-bucket
go 1.17
require (
github.com/aws/aws-sdk-go-v2 v1.11.2
github.com/aws/aws-sdk-go-v2/config v1.11.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.21.0
)
View echo_server.ex
# 比較用
# https://elixir-lang.org/getting-started/mix-otp/task-and-gen-tcp.html
defmodule KVServer do
require Logger
@doc """
Starts accepting connections on the given `port`.
"""
def accept(port) do
{:ok, socket} = :gen_tcp.listen(port,
View dart.json
{
"make equality properly": {
"prefix": "eq",
"body": [
"@override",
"bool operator ==(Object other) =>",
" identical(this, other) ||",
" other is $1 &&",
" runtimeType == other.runtimeType${2/ ([^ ]+)/ && ${1} == other.${1}/g};",
"",
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@niku
niku / instructions.md
Last active Jan 21, 2020
How to get a runtime_info as a file
View instructions.md
❯ iex
Erlang/OTP 22 [erts-10.6.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Interactive Elixir (1.10.0-rc.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> file = File.open!("./runtime_info.txt", [:write])
#PID<0.110.0>
iex(2)> original_group_leader = Process.group_leader()
#PID<0.64.0>
iex(3)> Process.group_leader(self(), file)
View instructions
/tmp $ git clone https://github.com/msantos/procket.git
/tmp $ cd procket/
/tmp/procket $ rebar3 compile
# The compile should be succeed
## Add new module
/tmp/procket $ echo '-module(hello).
-export([hello_world/0]).
hello_world() -> io:fwrite("hello, world\n").' > src/hello.erl
@niku
niku / index.md
Last active Nov 11, 2019
ふつうのプログラマたちはいいチームを作り維持することができるか
View index.md

ふつうのプログラマたちはいいチームを作り維持することができるか

私たちをとりまいていた状況

組織

@niku
niku / slide.org
Last active Jun 1, 2019
Slide for Erlang & Elixir Fest 2019 -- https://elixir-fest.jp/
View slide.org

Protocol Buffers implementation with using Elixir

Agenda

  • How to parse a binary 00001000_10010110_00000001 to %{1 => 150}
@niku
niku / Gemfile
Last active Apr 15, 2019
"JavaScript-Free Soft-Realtime Browsing" at https://pixiv.connpass.com/event/124727/
View Gemfile
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# Specify your gem's dependencies in rejectkaigi2019lt.gemspec
gemspec
View save_legacy.rb
require "securerandom"
require "pg"
require "org-ruby"
require "unf"
module SaveLegacy
class Error < StandardError; end
db_setting = {
connect_timeout: 300,