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
# | |
# Requires requests module. | |
# First argument is the URL to the target goindex- this one is necessary, obviously. | |
# Second argument is the folder of the name where the contents will be stored- | |
# defaults to 'goindex_download' if not provided. | |
# Other arguments will be ignored. | |
# | |
# Since my target had an unstable worker which throws 500 quite frequently, | |
# `request` method automatically retries the request until it receives 200. | |
# The delay is hardcoded to 1 second- you can change it if you want. |
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
#!/usr/local/bin/python3 | |
""" | |
This is a quick and dirty solution I wrote in 10 minutes, which then I piled more stuffs | |
without properly reorganizing the code. | |
It surely works, but is ugly, slow, and a mess. | |
`ipblack` list includes IP address prefixes that should be excluded from being banned. | |
this includes internal IP, and maybe IP from your ISP's cellular in case you want to | |
connect to your server from the outside. |
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
# | |
# Requires requests, bs4 module. | |
# also you need wget binary on your system too. | |
# First argument is the URL to the target oneindex- this one is necessary. | |
# Second argument is the folder of the name where the contents will be stored- | |
# defaults to 'oneindex_download' if not provided. | |
# Other arguments will be ignored. | |
# | |
import os |
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 time | |
import requests | |
with open("urldata", "r") as f: | |
data = f.read().split("\n") | |
interval = int(data[0]) | |
url_list = [x for x in data[1:] if x] | |
maxlen = max(map(len, url_list)) |
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
π Morning 59 commits βββββββββββββββββββββ 13.0% | |
π Daytime 50 commits βββββββββββββββββββββ 11.0% | |
π Evening 111 commits βββββββββββββββββββββ 24.4% | |
π Night 234 commits βββββββββββββββββββββ 51.5% |
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 | |
xwininfo -root -tree | grep '("spotify" "Spotify")' | grep -oE '(0x[0-9a-z]{7,8})' | xargs -I % wmctrl -i -r % -b toggle,fullscreen |
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
find /music -iname "*.flac" -print0 | xargs -P 16 -0 -I @ bash -c 'temp="@"; name="$(echo $temp | sed -E "s/\/.*?\///" | sed "s/.flac//")"; echo $name; ffmpeg -hide_banner -loglevel warning -i "$temp" -c:v copy -c:a alac -ar 44100 "/mnt/d/ALAC/$name.m4a"' |
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 ubuntu:latest | |
ENV DISPLAY=:99 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && apt-get install -y openbox xvfb x11vnc | |
CMD rm -rf /tmp/.X99-lock && \ | |
Xvfb $DISPLAY -screen 0 1280x1024x24 & \ | |
openbox & \ |
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 <stdio.h> | |
#include <stdlib.h> | |
struct Node { | |
int key; | |
void *data; | |
struct Node *left, *right, *parent; | |
}; | |
struct Node *insertNode(struct Node *node, int key, void *data) { |
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 "llist.h" | |
Linkedlist *llist_put(Linkedlist *list, char *key, void *value) { | |
if (list == NULL) { | |
list = calloc(1, sizeof(Linkedlist)); | |
*list = (Linkedlist) {key, value, NULL}; | |
return list; | |
} | |
if (!strcmp(key, list->key)) { |
OlderNewer