Skip to content

Instantly share code, notes, and snippets.

Avatar
🍀
Doing something interesting

桃子 movsb

🍀
Doing something interesting
View GitHub Profile
@movsb
movsb / pbcopy
Created May 22, 2020
A MacOS pbcopy implementation for linux servers.
View pbcopy
#!/bin/bash
set -euo pipefail
t=$(cat <&0 | base64 --wrap=0)
if [ ! -z ${STY+x} ]; then
echo -ne "\eP\e]52;c;$t\a\e\\"
elif [ ! -z ${TMUX+x} ]; then
echo -ne "\ePtmux;\e\e]52;c;$t\a\e\\"
else
@movsb
movsb / douban-movies-top250.go
Created May 9, 2020
A golang program to scrape [Douban Movie Top250](https://movie.douban.com/top250).
View douban-movies-top250.go
package main
import (
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
@movsb
movsb / tunnel.go
Created Dec 6, 2019
An HTTP Tunnel Proxy, which implements the CONNECT method. Written in Golang, within 100 lines of code.
View tunnel.go
package main
import (
"io"
"log"
"net"
"net/http"
"sync"
)
@movsb
movsb / main.cpp
Created Mar 10, 2017
在 C++ 中快速创建 LUA 自定义数据类型(带元表)的对象的一种包装方法
View main.cpp
#include <cstdio>
#include <string>
#include <iostream>
#include <lua/lua.hpp>
#define LUAAPI(name) static int name(lua_State* L)
#define DECL_OBJECT(T) class T