```hljs-meta
~/workspace
```$ export PATH
This file contains hidden or 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
kitten_alias ~/.config/kitty/try-theme.py try-theme | |
kitten_alias ~/.config/kitty/set-theme.py set-theme |
This file contains hidden or 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
#[macro_export] | |
#[doc = " generate tuple"] | |
macro_rules! tuple { | |
($($n: expr),*) => {($($n,)*)}; | |
} |
This file contains hidden or 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 query = q => document.querySelector(q); | |
const queryAll = q => document.querySelectorAll(q); | |
const append = (p, c) => { | |
p.appendChild(c); | |
return p; | |
}; | |
const text = t => document.createTextNode(t); | |
const element = (tag, attrs, children) => { |
This file contains hidden or 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 toZW = (text) => { | |
const zeroPad = num => '00000000'.slice(String(num).length) + num; | |
const textToBinary = username => ( | |
username.split('').map(char => zeroPad(char.charCodeAt(0).toString(2))).join(' ') | |
); | |
const binaryToZeroWidth = binary => ( | |
binary.split('').map((binaryNum) => { | |
const num = parseInt(binaryNum, 10); |
This file contains hidden or 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
" vim:fileencoding=utf-8:foldmethod=marker | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
" Required: | |
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim | |
" Required: |
This file contains hidden or 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
#: Color scheme {{{ | |
foreground #ebdbb2 | |
background #282828 | |
#: black | |
color0 #282828 | |
color8 #928374 | |
#: red |
This file contains hidden or 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 | |
RED='\033[0;31m' | |
BLUE='\033[0;34m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
#Update and install necesary tools | |
echo "${BLUE}UPDATING AND INSTALLING TOOLS ${NC}\n" | |
sudo apt update |
This file contains hidden or 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
// A sleep implementation in javascript | |
const sleep = t => new Promise(r=>setTimeout(r,t)); | |
// A function that rearranges an object returned by mongoose to play nicely with graphql resolvers | |
const objectify = o => (o.isArray()?o.map(e=>objectify(e)):({...o.toObject(),_id:o._id.toString()})); |
NewerOlder