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
#!/usr/bin/env -S bash -e | |
set -o xtrace | |
set -e | |
WORK=${WORK-0} | |
function set_gnome_configuration { | |
# Configure power settings | |
dconf write /org/gnome/desktop/session/idle-delay "uint32 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
#!/usr/bin/env -S bash -e | |
set -o xtrace | |
function set_gnome_configuration { | |
# Disable Gnome animations | |
gsettings set org.gnome.desktop.interface enable-animations false | |
# Dock settings | |
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true |
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 | |
pv backup.sql.gz | gunzip | mysql --max_allowed_packet=1GM -u root -p table_name |
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
meta: | |
id: pes20_player_bin | |
file-extension: bin | |
endian: le | |
encoding: UTF-8 | |
seq: | |
#- size: 8 | |
- id: body | |
type: body | |
# size: _io.size - 8 |
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
#!/usr/bin/python3 | |
import os, json, urllib, requests, csv | |
def html2csv(html): | |
from bs4 import BeautifulSoup | |
soup = BeautifulSoup(html, features="html.parser") | |
table = soup.find("table") | |
headers = [th.text.strip() for th in table.select("tr th")] | |
with open("out.csv", "w") as f: |
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
<?php | |
/* | |
This is a simple automagic MySQL wrapper which provides basic protection from SQL injections. | |
Usage (after you change database parameters on line 19): | |
require_once("db.php"); //in whichever script you want to run SQL code | |
... | |
$result = execute_sql("SELECT userId, userName, userAvatar FROM users WHERE username = ? AND email = ?", [$username, $email]); | |
foreach($result as $row) | |
echo $row["userId"].";".$row["userAvatar"]; | |
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
ffmpeg -i "concat:$(echo `ls .`|sed 's/ /|/g')" -c copy output.mts | |
rm 00*.MTS | |
ffmpeg -i output.mts file.mp4 |
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
/* tslint:disable:no-console */ | |
/* | |
Reuploads all photos on instagram page from page backup. | |
(when fascist mods decide that your satire must be hate speech) | |
sudo apt install node tsc npm | |
sudo npm install instagram-private-api | |
then copy your backup to ./backup | |
NewerOlder