Legend:
- 1.0 - Basics / Prerequisite Knowledge
- 1.0.1 Requirements
- 1.1 Creating your first template
from os import walk, path | |
for x in walk('/'): | |
for dirs in x[1]: | |
if dirs == ' ': | |
print(path.join(x[0], dirs)) | |
# test this by running the following bash | |
# mkdir " " | |
# run this script |
import random | |
import time | |
from os import name | |
IS_WIN = name.startswith('nt') | |
NO_COLOR = False | |
class HiLo_gamble: | |
def __init__(self, bet=float(), chance=47.5): | |
self.update(bet, chance) |
{ | |
"providers": { | |
"my-proxy.com": { | |
"renewal": 172800, | |
"types": { | |
"socks5": [ | |
"https://www.my-proxy.com/free-socks-5-proxy.html", | |
"https://www.my-proxy.com/free-socks-4-proxy.html" | |
]}, | |
"jsgen":false, |
import requests | |
import json | |
import time | |
def range_package(*args, **kwargs): | |
last_var = None | |
for i in range(*args, **kwargs): | |
if last_var and i: | |
yield last_var, i |
#[derive(Debug)] | |
struct Parent<T> { | |
children: Vec<T>, | |
} | |
impl<T> Parent<T> { | |
fn get(&self, index: usize) -> Option<&T> { | |
match self.children.get(index) { | |
Some(c) => Some(c), | |
None => None |
/* | |
** Self bot usage for serenity. | |
** Avoid API calls which handle | |
** guild invitation or require guild intent | |
** | |
** These tend to be where the alarms are set. | |
** Avoid prefixed commands & instant replies. | |
** | |
*/ |
- install the two shellscripts into the appropriate places under /etc/initramfs-tools | |
- run update-initramfs | |
- put "overlay=yes" on the kernel command line | |
- reboot | |
With the overlay in place, the real root is mounted readonly on /ro. | |
Only the root fs is changed, other filesystems are mounted normally. | |
Remove "overlay=yes" (or change it to something other than yes) and reboot to go back to readwrite. | |
(This probably means that you want the commandline config to live somewhere other than on the root fs, e.g. under /boot) |
# uploads files to transfer.sh/ | |
transfer() { | |
if [ $# -eq 0 ]; then | |
echo -e "No arguments specified. Usage: echo transfer /tmp/test.md cat /tmp/test.md | transfer test.md"; | |
return 1; fi | |
tmpfile=$( mktemp -t transferXXX ) | |
if tty -s; | |
then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g') | |
curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile |
May 31 04:09:05 start[421206]: 2023-05-31T08:09:05.483795Z INFO mockingbird: Mockingbird initializing... | |
May 31 04:09:05 start[421206]: 2023-05-31T08:09:05.632566Z INFO start:start_connection{shard_data=[0, 0, 1]}:initialize:boot{shard_info=[ShardId(0), ShardId(1)]}: serenity::client::bridge::gateway::shard_manager: Telling shard queuer to start shard 0 | |
May 31 04:09:05 start[421206]: 2023-05-31T08:09:05.761983Z INFO run: serenity::client::bridge::gateway::shard_runner: [ShardRunner [0, 1]] Running | |
May 31 04:09:05 start[421206]: Coggerz is connected! | |
May 31 04:09:05 start[421206]: 2023-05-31T08:09:05.937355Z WARN run:recv_event: serenity::model::channel: Unknown ChannelType value: 15 | |
May 31 04:09:54 start[421206]: 2023-05-31T08:09:54.152189Z INFO runner{config=Config { crypto_mode: Normal, decode_mode: Decrypt, gateway_timeout: Some(10s), preallocated_tracks: 1, driver_retry: Retry { strategy: Backoff(ExponentialBackoff { min: 250ms, max: 10s, jitter: 0.1 }), retry_limit: Some(5) }, driver_timeout: Some(1 |