This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -type f | xargs -n1 sed -i '' $'s/ /\t/g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package sqldb | |
| import ( | |
| "context" | |
| "database/sql" | |
| "net/http" | |
| "github.com/acoshift/middleware" | |
| "github.com/acoshift/pgsql" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| typedef struct { | |
| char *str; | |
| int len; | |
| } string; | |
| string appendString(string s1, string s2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| brew update && brew upgrade | |
| gcloud components update --quiet | |
| rustup update | |
| nvim +PluginInstall +qall | |
| n lts | |
| npm -g outdated --parseable --depth=0 | cut -d: -f4 | xargs npm -g i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "database/sql" | |
| "io" | |
| "log" | |
| "net/http" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "net/http" | |
| "time" | |
| "github.com/acoshift/hime" | |
| "github.com/acoshift/probehandler" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "sync" | |
| "syscall" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func removeDuplicateLoop2(arr []int) []int { | |
| r := make([]int, 0) | |
| for i := range arr { | |
| for j := range r { | |
| if arr[i] == r[j] { | |
| goto duplicated | |
| } | |
| } | |
| r = append(r, arr[i]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func removeDuplicateMap(arr []int) []int { | |
| p := make(map[int]struct{}) | |
| for _, v := range arr { | |
| p[v] = struct{}{} | |
| } | |
| r := make([]int, 0, len(p)) | |
| for v := range p { | |
| r = append(r, v) | |
| } | |
| return r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func removeDuplicateLoop(arr []int) []int { | |
| p := append([]int{}, arr...) | |
| for i := range p { | |
| for j := i + 1; j < len(p); j++ { | |
| if p[i] == p[j] { | |
| p = append(p[:j], p[j+1:]...) | |
| j-- | |
| } | |
| } | |
| } |