Skip to content

Instantly share code, notes, and snippets.

View saintedlittle's full-sized avatar
♻️
プレイリスト

saintedlittle saintedlittle

♻️
プレイリスト
View GitHub Profile
synapse.saintedlittle.nl {
reverse_proxy localhost:8008
@wellknown path /.well-known/matrix/client
handle @wellknown {
header Content-Type application/json
@saintedlittle
saintedlittle / create_desktop.sh
Created August 16, 2023 18:37
Desktop file creator. (WITH IMAGE)
#!/bin/sh
# "CONFIG" ZONE #######################################################
GAME_NAME="Euro Truck Simulator 2"
GAME_VERSION="1.27.2.4s"
GAME_ICON_NAME="227300.png"
# END OF "CONFIG" ZONE ################################################
# Thanks to Vitally_D for the idea of this script
#################################################
# Detect/set directories
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
@saintedlittle
saintedlittle / holygrailflexbox-hdrftr-fullwidthfixedht-mine.markdown
Created January 22, 2023 18:03
HolyGrailFlexBox-HdrFtr-FullWidthFixedHt-MINE
@saintedlittle
saintedlittle / main.c
Created October 30, 2022 10:29
[C/C++] getopt() + strtol() + secure parsing of numeric values
while((opt = getopt(argc, argv, ":f:o:t:h")) != -1) {
switch(opt) {
case 'f':
infile = fopen(optarg, "rt");
break;
case 'o':
outfile = fopen(optarg, "wt");
break;
case 't':
{
@saintedlittle
saintedlittle / script.js
Last active June 24, 2022 22:46
Script to get all items on event: STEAM 3000. Usage: on the search page in the browser you paste into the console and get the last icon
(async() => {
let delay = (ms) => new Promise((res) => setTimeout(res, ms));
await jQuery.post("/saleaction/ajaxopendoor", {
"sessionid": g_sessionID,
"authwgtoken": jQuery("#application_config").data("userinfo").authwgtoken,
"door_index": 0,
"clan_accountid": 41316928,
});
for (let link of [
"/category/arcade_rhythm/?snr=1_614_615_clorthaxquest_1601",
@saintedlittle
saintedlittle / wall_get.php
Created May 10, 2022 19:42
wall.get - VK request
header('Content-type: text/html; charset=utf-8');
$wall_id="-95098766"; // Положительное число: пользователь. Отрицательное: группа.
$count="20"; // Количество записей, которое необходимо получить. Максимальное значение: 100.
$api = file_get_contents("http://api.vk.com/method/wall.get?owner_id={$wall_id}&count={$count}");
$wall = json_decode($api,true);
foreach ($wall['response'] as $item => $result) {
echo $result['text'].'<hr/>';
}
@saintedlittle
saintedlittle / gradlesigning.md
Last active March 8, 2024 15:49 — forked from phit/gradlesigning.md
Gradle Signing for Dummies

Настройка GPG ключей для деплоя на mavenCentral

Windows

Загрузите бинарный выпуск GnuPG для текущей версии Windows с [официального сайта] (https://www.gnupg.org/download/index.html) и установите его.

Линукс

Возьмите последнюю версию gpg из вашего менеджера пакетов, если она еще не установлена;)

@saintedlittle
saintedlittle / all_code.py
Created April 23, 2021 09:35
весь код модуля
import json
import shutil
from datetime import datetime
from itertools import repeat
from multiprocessing import Pool
from os import cpu_count, makedirs
from os.path import join, exists
import requests
import vk_api
@saintedlittle
saintedlittle / config.json
Created April 23, 2021 09:29
пример конфигцрации
[
{
"mode": "collect",
"dump_config": {
"path": "dump",
"download": false,
"download_errors": "download_errors.json"
},
"login_data": {
"token": "",
@saintedlittle
saintedlittle / dump-manager.py
Created April 23, 2021 09:28
код дамп-менеджера
def dump_manager(config):
dump_config = config['dump_config']
if config['mode'] == 'collect':
vk = collect(config['login_data'])
dump_config.update({'albums': vk.albums, 'docs': vk.docs, 'conversations': vk.conversations, 'users': vk.users,
'account': vk.account})
elif config['mode'] == 'dump':
dump_config.update({'albums': load_collection(dump_config['albums']),
'docs': load_collection(dump_config['docs']),