View pbcopy
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 | |
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 |
View douban-movies-top250.go
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" | |
"io" | |
"net/http" | |
"os" | |
"strconv" | |
"strings" |
View tunnel.go
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 ( | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"sync" | |
) |
View main.cpp
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 <cstdio> | |
#include <string> | |
#include <iostream> | |
#include <lua/lua.hpp> | |
#define LUAAPI(name) static int name(lua_State* L) | |
#define DECL_OBJECT(T) class T |