This file contains 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 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 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 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 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 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 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 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
gcloud container images list-tags --format=json gcr.io/$PROJECT_ID/$IMAGE | \ | |
jq -r '.[].digest' | \ | |
awk 'NR > 10 {print "gcr.io/$PROJECT_ID/$IMAGE@" $1}' | \ | |
xargs -P 10 -n 10 gcloud container images delete -q --force-delete-tags | |
This file contains 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 "fmt" | |
func p(s, n, i, j int) int { | |
if i == 0 || j == 0 || i == n-1 || j == n-1 { | |
if i-j <= 0 { | |
return s + j + i + 1 | |
} | |
return s + 4*(n-1) - j - i + 1 |
This file contains 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" | |
"fmt" | |
"os" | |
"path/filepath" | |
"strconv" | |
"sync" |