Skip to content

Instantly share code, notes, and snippets.

View fujimaki-k's full-sized avatar

fujimaki-k fujimaki-k

  • FujimakiShouten
View GitHub Profile
@fujimaki-k
fujimaki-k / normalize.go
Created May 3, 2023 02:53
Unicode string normalization example
package main
import (
"fmt"
"regexp"
"strings"
"golang.org/x/text/unicode/norm"
)
@fujimaki-k
fujimaki-k / concurrent.go
Created May 3, 2023 02:44
Alternative concurrent example
package main
import (
"errors"
"fmt"
"runtime"
"sync"
)
// Concurrent is concurrently execute tasks for number of CPUs.
@fujimaki-k
fujimaki-k / concurrent.go
Created May 3, 2023 02:43
Concurrent example
package main
import (
"errors"
"fmt"
"runtime"
"sync"
)
// Concurrent is concurrently execute tasks for number of CPUs.
@fujimaki-k
fujimaki-k / throttling.go
Created May 3, 2023 02:38
Throttling and exponential backoff example
package main
import (
"fmt"
"time"
)
// Throttling is provides throttling and exponential backoff calls.
func Throttling(weight int, rate int) {
if weight < 1 {
@fujimaki-k
fujimaki-k / profiler.go
Created May 2, 2023 10:42
CPU and memory profiler example
package main
import (
"fmt"
"os"
"runtime"
"runtime/pprof"
)
func main() {
@fujimaki-k
fujimaki-k / intellij.desktop
Created September 10, 2022 12:04
Desktop Entry file sanple
[Desktop Entry]
Encoding=UTF-8
Name=IntelliJ IDEA
Comment=Jetbrains IntelliJ IDEA IDE
Exec=/home/miki/bin/idea
Icon=/opt/jetbrains/idea/bin/idea.png
Terminal=false
Type=Application
Categories=Application;Development;IDE
NoDisplay=false
@fujimaki-k
fujimaki-k / dictconv.py
Created November 12, 2021 09:57
Convert ATOK user dictionary to macOS plist
#!/usr/bin/env python3
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
import sys
print('<?xml version="1.0" encoding="UTF-8"?>')
@fujimaki-k
fujimaki-k / apt
Last active September 20, 2021 06:44
brew wrapper
#!/bin/sh
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
set -C
BREW_COMMAND="brew"
@fujimaki-k
fujimaki-k / keybase.md
Created February 5, 2021 12:53
Please publicly post the following Gist, and name it keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@fujimaki-k
fujimaki-k / config.yml
Created September 5, 2020 07:09
CircleCI config.yml sample
version: 2.1
commands:
buildimage:
description: "Build docker image"
steps:
- checkout
- setup_remote_docker
- run:
name: "Install git command"
command: "apk add git"