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
{ config, lib, pkgs, ... }: { | |
boot.kernelPackages = pkgs.linuxPackages_5_15; | |
users.users = { | |
tarn = { | |
isNormalUser = true; | |
extraGroups = [ "wheel" ]; | |
password = ""; | |
}; | |
}; |
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 node:latest | |
WORKDIR /app | |
COPY . . | |
RUN yarn | |
CMD ["node", "index.js"] |
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 requests | |
from datetime import datetime | |
def check(domain, referer): | |
url = 'https://' + domain + '/mesh/v1/category?location=com' | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0', | |
'Accept': '*/*', | |
'Accept-Language': 'en-US,en;q=0.5', | |
'Access-Control-Request-Method': 'GET', |
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 yaml | |
from yaml.composer import Composer | |
from yaml.reader import Reader | |
from yaml.scanner import Scanner | |
from yaml.parser import Parser | |
from yaml.constructor import SafeConstructor | |
from yaml.resolver import Resolver | |
class CommentsScanner(Scanner): | |
def scan_to_next_token(self): |
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 yaml | |
from collections import OrderedDict | |
class OrderedDumper(yaml.SafeDumper): | |
pass | |
def _dict_representer(dumper, data): | |
return dumper.represent_mapping( | |
yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, | |
data.items()) |
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
{ config, lib, pkgs, ... }: | |
with lib; | |
{ | |
imports = | |
[ | |
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> | |
./machine-config.nix | |
]; |
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
$ curl -v https://www.example.com -k --proxy debugproxy.com:8080 | |
* Trying 2a01:4f8:120:6104::2... | |
* TCP_NODELAY set | |
* connect to 2a01:4f8:120:6104::2 port 8080 failed: Connection refused | |
* Trying 178.63.44.71... | |
* TCP_NODELAY set | |
* Connected to debugproxy.com (178.63.44.71) port 8080 (#0) | |
* allocate connect buffer! | |
* Establish HTTP proxy tunnel to www.example.com:443 | |
> CONNECT www.example.com:443 HTTP/1.1 |
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 | |
INCLUDES=${INCLUDES:="less,vim,sudo,openssh-server,acpid,dbus"} | |
ARCH=${ARCH:=amd64} | |
IMGSIZE=${IMGSIZE:=80G} | |
clean_debian() { | |
echo "Cleaning up.." | |
[ "$MNT_DIR" != "" ] && chroot $MNT_DIR umount /proc/ /sys/ /dev/ /boot/ | |
sleep 1s |
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
# clone | |
git clone https://github.com/rails/rails | |
# change working dir | |
cd rails | |
# grab all the branches | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do | |
git branch --track ${branch#remotes/origin/} $branch | |
done |
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
# Delete all the CI/CD logs for a gitlab project | |
# | |
# Requires: | |
# python 3 | |
# | |
# requests==2.18.4 | |
# lxml==4.2.1 | |
# cssselect==1.0.3 | |
# |
NewerOlder