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
goos: linux | |
goarch: amd64 | |
BenchmarkStringPlus-8 77480 132547 ns/op 1205014 B/op 1 allocs/op | |
BenchmarkStringPlusFmt-8 63650 124560 ns/op 1203372 B/op 3 allocs/op | |
BenchmarkStringBuilder-8 51845487 77.0 ns/op 185 B/op 0 allocs/op | |
BenchmarkStringBuilderFmt-8 7772652 146 ns/op 216 B/op 1 allocs/op |
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
[[projects]] | |
name = "github.com/fsnotify/fsnotify" | |
packages = ["."] | |
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" | |
version = "v1.4.7" | |
[[projects]] | |
branch = "master" | |
name = "github.com/hashicorp/hcl" | |
packages = [".","hcl/ast","hcl/parser","hcl/printer","hcl/scanner","hcl/strconv","hcl/token","json/parser","json/scanner","json/token"] |
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
[ | |
{ | |
"name": "Full Size Orthorlinear", | |
"switchMount": "cherry", | |
"switchBrand": "kailh", | |
"switchType": "PG151101D64/D10", | |
"plate": true | |
}, | |
[ | |
{ |
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
func main() { | |
m := muxchainutil.NewMethodMux() | |
m.Handle("GET /kitten", http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { | |
f, _ := os.Open("kitten.jpg") | |
defer f.Close() | |
io.Copy(w, f) | |
})) | |
http.ListenAndServe(":3000", m) |
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
-- | |
-- Set a lock | |
-- | |
-- KEYS[1] - key | |
-- KEYS[2] - ttl in ms | |
-- KEYS[3] - lock content | |
{key, ttl, content} = KEYS | |
lockSet = redis.call 'setnx', key, content |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE language SYSTEM "language.dtd"> | |
<!-- | |
By Harley Laue <[email protected]> | |
Based on the CoffeeScript syntax file by Max Shawabkeh ([email protected]) | |
and the Lua syntax file by Bruno Massa | |
--> | |
<language name="MoonScript" | |
version="1.0" |
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
--[[ | |
DO NOT MAKE CHANGES TO THIS FILE! | |
This file will purposefully overwritten when moonc is run. However it provides | |
an easy way to do Moonscript development without having to use moonc to compile | |
to Lua. | |
]]-- | |
--[[ | |
License (MIT) |
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
function markdown() | |
{ | |
lua5.1 <(echo "$(cat << EOLUA | |
discount=require("discount") | |
if #arg > 0 then | |
for _,v in ipairs(arg) do | |
local lines = "" | |
local f = io.open(v, "r") | |
if not f then | |
io.output(io.stderr):write(string.format([[%s: No such file or directory\n]], v)) |
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/sh | |
find /boot -type f -mtime +90 -and -name "vmlinuz*" | while read i; do dpkg -S $i; done | cut -d":" -f1 | xargs dpkg -r |
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
# useful for when you have multiple lua commands for different versions | |
for i in lua lua5.2 lua5.1 luajit; do | |
function $i() | |
{ | |
# Get Lua's version | |
local lua_version=$(command $0 -e "print(string.sub(_VERSION, -3))") | |
# Append to Lua's paths using normal shell variable interpolation | |
LUA_PATH=$(command $0 -e "print(package.path..';$HOME/.luarocks/share/lua/$lua_version/?.lua;$HOME/.luarocks/share/lua/$lua_version/?/init.lua;$HOME/.local/share/lua/$lua_version/?.lua;$HOME/.local/share/lua/$lua_version/?/init.lua')") \ | |
LUA_CPATH=$(command $0 -e "print(package.cpath..';$HOME/.luarocks/lib/lua/$lua_version/?.so;$HOME/.local/lib/lua/$lua_version/?.so')") \ | |
command $0 $* |
NewerOlder