Skip to content

Instantly share code, notes, and snippets.

View oz123's full-sized avatar
🎯
Focusing

Oz Tiram oz123

🎯
Focusing
View GitHub Profile
@oz123
oz123 / upload.js
Created February 12, 2019 20:32
using openpgp to encrypt uploaded file.
import "babel-polyfill";
var openpgp = require('openpgp'); // use as CommonJS, AMD, ES6 module or via window.openpgp
const query = query => document.querySelector(query);
const queryAll = query => Array.prototype.slice.apply(document.querySelectorAll(query));
const pub_key =
['-----BEGIN PGP PUBLIC KEY BLOCK-----',
'Version: GnuPG v2.0.22 (GNU/Linux)',
@oz123
oz123 / flatten.go
Last active April 25, 2019 08:49
Flatten a list of lists in Python and Go
package main
import (
"encoding/json"
"fmt"
)
func flatten(s []interface{}) (r []int) {
// type switch already discussed in the tour of go
for _, item := range s {
@oz123
oz123 / gist:ade4528c87913077a8bbf88e864df234
Last active December 9, 2024 07:37
gio showing luks partition.
oznt@gentoo-elli ~ $ gio mount -l
Drive(0): TS1TMTE220S
Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Drive(1): SanDisk Ultra II 480GB
Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Volume(0): 479 GB Encrypted
Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
Volume(1): 767 MB Volume
Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
oznt@gentoo-elli ~ $
@oz123
oz123 / config.lua
Last active January 16, 2025 10:03
My lunar vim config- ~/.config/lvim/config.lua
-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Example configs: https://github.com/LunarVim/starter.lvim
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
--
lvim.plugins = {
{ "lunarvim/colorschemes" },
{ "HiPhish/rainbow-delimiters.nvim" }
}