Skip to content

Instantly share code, notes, and snippets.

🤷‍♂
how to exit vim

Cryven codcodog

🤷‍♂
how to exit vim
Block or report user

Report or block codcodog

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@codcodog
codcodog / request.go
Created May 7, 2019
HTTP 请求示例
View request.go
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://cn.bing.com", nil)
View lines.go
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
@codcodog
codcodog / cli.go
Last active Apr 28, 2019
golang 命令行
View cli.go
package main
import (
"flag"
"fmt"
"os"
)
func main() {
var (
View ctags-for-php-include-trait.sh
ctags --languages=php --regex-php='/^[ \t]*trait[ \t]+([a-z0_9_]+)/\1/t,traits/i' -R .
@codcodog
codcodog / getParam.js
Last active Mar 20, 2019
获取 URL GET 参数
View getParam.js
function getParam(paramName, defaultValue = '')
{
let url = location.search;
let params = new Object();
if (url.indexOf('?') != -1) {
url = url.slice(1);
strs = url.split('&');
strs.forEach(function (str) {
@codcodog
codcodog / copyToClipboard.html
Last active Mar 20, 2019
浏览器复制文本
View copyToClipboard.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<input id="el" type="text" value="Hello World." />
<button id="copy">复制</button>
</body>
View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
You can’t perform that action at this time.