sudo su
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | tee /etc/apt/sources.list.d/sublime-text.list
apt-get update
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 STORE_LOG_LEVEL = 'LOG_LEVEL'; | |
const STORE_LOG_MODULE = 'LOG_MODULE'; | |
export enum Level { | |
Debug = 3, | |
Info = 2, | |
Warn = 1, | |
Error = 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
[init] | |
defaultBranch = main | |
[user] | |
name = typable | |
email = contact@typable.dev | |
[alias] | |
st = status -sb | |
cm = commit -m | |
co = checkout | |
cp = cherry-pick |
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
// [dependencies] | |
// pico-args = "0.5.0" | |
// regex = "1.7.0" | |
use std::io; | |
use std::io::Read; | |
use std::io::Write; | |
use std::net::TcpStream; | |
use regex::Regex; |
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 [[ "$1" == "new" ]]; then | |
if [[ -f ".snip" ]]; then | |
echo "Not empty dir!" | |
exit 0 | |
fi | |
cp -r /d/bin/_snip/* ./ | |
touch .snip | |
echo "Created a new snip." |
OSI Reference Model
Layer | Function | Examples |
---|---|---|
Application | High-level APIs, including resource sharing, remote file access | HTTP, WebSocket |
Presentation | Translation of data between a networking service and an application; including character encoding, data compression and encryption/decryption | MIME, SSL, TLS |
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 base(n) { | |
return Math.pow(2, n) + 1; | |
} | |
function find(x, n) { | |
let b = 2; | |
let i = 0; | |
while(x > b) { | |
b = base(i + 1); | |
i++; |
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 | |
type Node struct { | |
val int | |
ref *Node | |
} | |
type Linkedlist struct { | |
list *Node | |
} |
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
import request from './request.js'; | |
const EXTERNAL_IP_SERVICE_URL = 'http://checkip.amazonaws.com'; | |
const DOMAIN_IP_SERVICE_URL = 'https://dns.google.com/resolve'; | |
const DOMAIN_PROVIDER_SERVICE_URL = 'https://dynamicdns.park-your-domain.com'; | |
async function resolve(domain) { | |
if(typeof domain === 'undefined' || domain.length == 0) { | |
throw 'Invalid domain argument!'; | |
} |
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 KEY_BINDING = { | |
0: 'A', | |
1: 'B', | |
2: 'X', | |
3: 'Y', | |
4: 'L1', | |
5: 'R1', | |
6: 'L2', | |
7: 'R2', | |
8: 'Option', |
NewerOlder