Skip to content

Instantly share code, notes, and snippets.

View schwarzeni's full-sized avatar
📚
good good study, day day up

schwarzeni

📚
good good study, day day up
View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active May 3, 2024 09:26
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active April 11, 2024 23:56
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@hellokaton
hellokaton / README.md
Last active March 29, 2024 02:33
Go 的信号处理和优雅退出

每个平台的信号定义或许有些不同。下面列出了POSIX中定义的信号。 Linux 使用34-64信号用作实时系统中。 命令man 7 signal提供了官方的信号介绍。

在POSIX.1-1990标准中定义的信号列表

@CreatorB
CreatorB / scp run in the background
Last active March 13, 2024 10:32
How to put scp in background
To execute any linux command in background we use nohup. But the problem with scp command is that it prompts for the password (if password authentication is used). So to make scp execute as a background process do this:
1>
$ nohup scp file_to_copy user@server:/path/to/copy/the/file > nohup.out 2>&1
if it prompts for password then enter password.
Then press ctrl + z which will temporarily suspend the command,
SCP will give output:
@tevino
tevino / epoll.go
Last active January 20, 2024 22:50
An example of using epoll in Go
package main
import (
"fmt"
"net"
"os"
"syscall"
)
const (
@drewolson
drewolson / reflection.go
Last active November 20, 2023 09:39
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@SimonSun1988
SimonSun1988 / gist:2ef7db45e46b889783647d941ec15e4d
Created April 12, 2016 03:03
解決 Ubuntu "can’t set the locale; make sure $LC_* and $LANG are correct" 的錯誤
## 安裝語系檔
`$ sudo locale-gen "en_US.UTF-8"`
## 重新設定語系檔
`$ sudo dpkg-reconfigure locales`
## 設定檔