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
-- inline=false | |
local cfgl = | |
{ indent='' -- like parentindent | |
, prefixindent="" -- use indent | |
, prefix="{\n" | |
, suffixindent=nil -- use indent | |
, suffix="}\n" | |
, itemindent='\\t ' -- use indent | |
, itemprefix="" | |
, itemsuffix=",\n" |
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
--[[ print("a") | |
print("b") | |
]]-- print("c") | |
print("D") --[[ | |
print("e") | |
print("f") ]]-- | |
--[[-- print("a") | |
print("b") | |
--]]-- print("c") --[[-- |
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 | |
# source: https://gist.github.com/tst2005/797af97fd263677da9e3eede873887ac | |
for i in $* | |
do | |
echo "$i" | |
openssl x509 -subject -issuer -enddate -noout -in $i \ | |
| sed -e 's#, \([^ ]\+\) = #/\1=#g' -e 's,^\(subject\|issuer\)=\([^ ]\+\) = ,\1= /\2=,g' | |
echo "--------" |
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 <stdio.h> | |
int main(void) { | |
printf("C C CCCCC C C CCC C C CCC CCCC C CCCC\n"); | |
printf("C C C C C C C C C C C C C C C C\n"); | |
printf("CCCCC CCCC C C C C C C C C C CCCC C C C\n"); | |
printf("C C C C C C C C C C C C C C C C C\n"); | |
printf("C C CCCCC CCCCC CCCCC CCC C C CCC C C CCCCC CCCC\n"); | |
return 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
local a = 1 | |
local function a() return a end | |
assert( type( a() ) == "function" ) | |
local a = 1 | |
local a; function a() return a end | |
assert( type( a() ) == "function" ) | |
local a = 1 | |
local a = function() return a end |
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
--[[ | |
local function ✆(✕,✖) | |
local ☻ = ✕+✖ | |
return ☻ | |
end | |
return ✆ | |
]]-- | |
local function 🐅(😸, 😹) | |
local 😼 = 😸 + 😹 |
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
#alias sshtmp='ssh -oUserKnownHostsFile="$HOME/.ssh/tmp_known_hosts"' | |
#alias scptmp='scp -oUserKnownHostsFile="$HOME/.ssh/tmp_known_hosts"' | |
alias sshtmpreset='>$HOME/.ssh/tmp_known_hosts ;#' | |
alias sshtmp='__sshtmp_cmd ssh' | |
alias scptmp='__sshtmp_cmd scp' | |
__sshtmp_cmd() { | |
local cmd="$1";shift | |
local host="$1" | |
local user='' |
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
local function test(f) | |
local function pack2end(a1, ...) | |
return a1, {...} | |
end | |
local ok, t_result = pack2end(pcall(f)) | |
if not ok then | |
return("error="..t_result[1] ) | |
else | |
return("ok="..#t_result ) |
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 | |
if [ $# -ne 3 ]; then | |
echo "Usage: $0 <n> <orig.pdf> <new.pdf>" | |
exit 1 | |
fi | |
command -v pdfseparate >/dev/null || { echo >&2 "require pdfseparate"; exit 1; } | |
command -v pdfunite >/dev/null || { echo >&2 "require pdfunite" ; exit 1; } |
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
local data = ??? | |
for line in data:read("*l") do -- OR data:match("([^\n])\n") do | |
for word in line:match("(%S+)") do | |
i=i+1 | |
end | |
i=i+10 | |
end |