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 | |
| func main() { | |
| searchDir := "./day=27" | |
| fileList := make([]string, 0) | |
| filepath.Walk(searchDir, func(path string, f os.FileInfo, err error) error { | |
| if f.IsDir() { | |
| return nil | |
| } |
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 | |
| PGPASSWORD="password" psql -h127.0.0.1 -p5432 -Uuser -ddatabase |
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
| kubectl get secrets -o json --namespace old | jq '.items[].metadata.namespace = "new"' | kubectl create -f - |
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 ( | |
| "os" | |
| "github.com/k0kubun/pp" | |
| yaml "gopkg.in/yaml.v2" | |
| ) | |
| type DNS struct { |
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 bloom | |
| import ( | |
| "encoding/gob" | |
| "bytes" | |
| ) | |
| func GetBytes(key interface{}) ([]byte, error) { | |
| var buf bytes.Buffer | |
| enc := gob.NewEncoder(&buf) |
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
| function! s:find_git_root() | |
| return system('git rev-parse --show-toplevel 2> /dev/null')[:-2] | |
| endfunction | |
| command! ProjectFiles execute 'Files' s:find_git_root() |
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
| class Sample: | |
| def __init__(self): | |
| pass | |
| @classmethod | |
| def helloo(cls): | |
| print('class hello') | |
| def hello(self): |
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
| try: | |
| print("try") | |
| raise Exception("RAISE") | |
| except Exception as e: | |
| print(e) | |
| finally: | |
| print("finally") |
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
| %load_ext autoreload | |
| %autoreload 2 |
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
| 1. 15 | |
| 2. 30 | |
| 3. 60 | |
| 4. 125 | |
| 5. 250 | |
| 6. 500 | |
| 7. 1000 | |
| 1. 0 | |
| 2. 0 |