View main.go
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"os" | |
"reflect" | |
"strings" | |
) |
View main.go
package main | |
import ( | |
"context" | |
"crypto/tls" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net" | |
"net/http" |
View main.go
package main | |
import ( | |
"fmt" | |
"net/http" | |
"strconv" | |
"strings" | |
"sync" | |
"time" | |
) |
View main.go
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"path/filepath" | |
"strconv" | |
"sync" |
View main.go
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 |
View gist:bb1db12539ffd0ac8ed0cbf520ec19ac
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 | |
View script.sh
find . -type f | xargs -n1 sed -i '' $'s/ /\t/g' |
View sqldb.go
package sqldb | |
import ( | |
"context" | |
"database/sql" | |
"net/http" | |
"github.com/acoshift/middleware" | |
"github.com/acoshift/pgsql" | |
) |
View main.c
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
typedef struct { | |
char *str; | |
int len; | |
} string; | |
string appendString(string s1, string s2) { |
View update.bash
#!/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 |
NewerOlder