Skip to content

Instantly share code, notes, and snippets.

@sheercat
sheercat / custom.css
Last active March 6, 2018 09:27
custom.css
/*
// Override Slack CSS
// Tested with
// - Slack 2.8.2 Direct Download
// - Slack 2.8.2 App Store (Zero)
// Instructions:
// - Append the following javascript code to:
@sheercat
sheercat / gist:d675934515759780b68064d87556594c
Created February 20, 2018 02:49 — forked from miukoba/gist:cf07177987c2bef33d567c64ea3eef17
Slackに全てのひらがなをemojiとして追加する手順

感謝

  • いらすとやの素材を使用させていただきました

手順

ファイル名の一括置換に mac の homebrew で入る renaem コマンドを使用しているが、他の方法でも良い

  1. Chromeで http://www.irasutoya.com/2013/02/50.html を開く (他のブラウザでも同じような感じに保存できると思うけど試してません)
  2. 「ページを別名で保存」 - 「ウェブページ、完全」 で保存すると、htmlファイルと、画像等が入ったディレクトリが出来る
@Slf4j
@Service
public class APIServiceHelper {
final private String API_BASE_URL = "http://vps2.vg4.net/env/";
public APIService create() {
OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
// HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
// logging.setLevel(HttpLoggingInterceptor.Level.BODY);
package main
import (
"bufio"
"io"
"os"
)
func main() {
r := bufio.NewReaderSize(os.Stdin, 16000000)
package main
import (
"bufio"
"fmt"
"os"
"os/signal"
"syscall"
"time"
)
@sheercat
sheercat / bench.sh
Last active August 29, 2015 14:28
bench sh
$go test -bench .
testing: warning: no tests to run
PASS
BenchmarkA 20000 73288 ns/op
BenchmarkB 2000000 669 ns/op
BenchmarkC 200000 6735 ns/op
ok _/Users/amano/MEMO/go/strdiv 5.646s
@sheercat
sheercat / stridivbench_test.go
Last active August 29, 2015 14:28
strdiv bench in go
package main
import "testing"
import "strings"
var Msg = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
func BenchmarkA(b *testing.B) {
len := 80
@sheercat
sheercat / coloneq.go
Created August 3, 2015 02:15
:= 挙動
package main
import (
"fmt"
)
func doHoge() (string, error) {
return "hoge", nil
}
func doMain1() {
<!-- layout.html -->
{{define "layout"}}
<!DOCTYPE html>
<html lang="ja">
<head>
<title>{{template "title"}}</title>
</head>
<body>
{{template "content" .}}
</body>
html, err := template.New("view").ParseFiles("layout.html", "define.html", "index.html")
html.ExecuteTemplate(w, "layout", map[string]interface{}{"reqParams": reqParams})