Env:
Ubuntu: 22.04
Node: v16.17.0
Npm: 8.15.0
Java: openjdk 11.0.16
Git: 2.34.1
Docker: 20.10.12
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
#include <assert.h> | |
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#define IDX(i, j, n) (((j)+ (i)*(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
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading.Tasks; | |
const int grpcPort = 5000; | |
const int proxyPort = 3000; | |
var tcp1 = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
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 | |
# install video card driver (manjaro only) | |
echo "Attempting to install video card driver" | |
sudo mhwd -a pci nonfree 0300 | |
# check kernel version | |
kv=$(uname -r | awk -F'.' '{print $1$2}') | |
echo "Attempting to install network card driver" |
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
Navigation | |
k | |
h l | |
j | |
H - move to top of screen | |
M - move to middle of screen | |
L - move to bottom of screen | |
K - open man page for word under the cursor |
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
import Data.List | |
data Tree a = EmptyNode | |
| Node { value:: a, low :: Tree a, high :: Tree a } deriving (Show) | |
type Point = [Int] | |
cmpAlong :: Int -> Point -> Point -> Ordering | |
cmpAlong ax p1 p2 | |
| p1 !! ax > p2 !! ax = GT |
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
class Point extends Array { | |
get x() { return this[0] } | |
get y() { return this[1] } | |
set x(x) { this[0] = x } | |
set y(y) { this[1] = y } | |
} | |
const pointInRange = (point, min, max) => point.every((val, ax) => min[ax] <= val && val <= max[ax]) | |
function medianPart(arr, ax) { |
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
from tabula import read_pdf | |
df = read_pdf('k36.pdf', output_format='tsv') | |
print(df) |
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
class Point extends Array { | |
get x() { return this[0] } | |
set x(val) { this[0] = val } | |
get y() { return this[1] } | |
set y(val) { this[1] = val } | |
get z() { return this[2] } | |
set z(val) { this[2] = val } | |
} |
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
mkdir ~/git | |
mkdir ~/git/dotfiles | |
# add alias | |
echo "alias config=$(which git) --git-dir=$HOME/git/dotfiles --work-tree=$HOME" >> .zshrc | |
source .zshrc | |
config config --local status.showUntrackedFiles no |
NewerOlder