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 ls = require "luasnip" | |
local s = ls.snippet | |
local i = ls.insert_node | |
local t = ls.text_node | |
local f = ls.function_node | |
local function copyname(args) | |
return args[1] | |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"sync/atomic" | |
"time" | |
) | |
var isBusy int32 |
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> | |
#define version __STDC_VERSION__ | |
int | |
main (int argc, char *argv[]) | |
{ | |
printf ("Your c version is: %ld\n", version); | |
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
function toHex(bArr) { | |
var result = ""; | |
for (var i = 0; i < bArr.length; i++) { | |
let dec = bArr[i] & 0xff; | |
var hex = Java.use("java.lang.Integer").toHexString(dec); | |
if (hex.length % 2 == 1) { | |
hex = "0" + hex; | |
} | |
result += hex; | |
} |
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
from cv2 import cv2 | |
foo = cv2.imread("./foo.png") | |
bar = cv2.imread("./bar.png") | |
key = cv2.bitwise_xor(foo, bar) | |
cv2.imshow("xored data", key) | |
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 wildignore+=*.pyc | |
set guicursor= | |
set relativenumber | |
set nohlsearch | |
set hidden | |
set noerrorbells | |
set tabstop=4 softtabstop=4 | |
set shiftwidth=4 |
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
const array1 = ["A", "B", "C"]; | |
const array2 = ["1", "2", "3"]; | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce | |
// acc is the Accumulator for our result, it starts with [] | |
// for each element in array 1, we will use the add operator when `map` with each element in array 2. | |
const result = array1.reduce( | |
(acc, v) => [...acc, ...array2.map((x) => v + x)], |
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 ( | |
"embed" | |
"fmt" | |
"log" | |
) | |
//go:embed ddl/* | |
var files embed.FS |
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 ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"os/exec" | |
"strings" | |
) |
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 ( | |
"crypto/md5" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"path/filepath" |