Skip to content

Instantly share code, notes, and snippets.

@koutoftimer
koutoftimer / Clickpocalypse-2-idle.js
Last active Sep 20, 2021
Clickpocalypse 2 automation script
View Clickpocalypse-2-idle.js
// Usage: run this script in your browser.
//
// By default it doesn't starts automatically. You have to run `turn_on()` function
// or start each module indivitually `auto_<name>.start()`.
// `turn_off()` and `auto_<name>.stop()` does the oposite.
// `modules_preset` defines set of modules to be handled by `turn_*` functions.
//
// ------------------------------------------
// -- Utility
@koutoftimer
koutoftimer / fast-torrent-sorter.sh
Created Sep 11, 2021
Load and sort torrent list at fast-torrent.ru without waiting for page to fully load
View fast-torrent-sorter.sh
#!/usr/bin/env bash
# Usage: fast-torrent-sorter <URL>
# or: fast-torrent-sorter
#
# Required software and tools:
# * `wget` or `curl` - to load torrent list
# * `xclip` - fallback in case if no arguments provided
# * `xdg-open` - to be more generic about default browser
#
# kind of standard:
@koutoftimer
koutoftimer / Cargo.toml
Last active Sep 7, 2020
Test available backends for wgpu
View Cargo.toml
[dependencies]
wgpu = "0.6.0"
@koutoftimer
koutoftimer / README.md
Created Feb 16, 2019
Clipboard to QR code
View README.md

Generates QR code from clipboard as PNG image and displays in default viewer. Usefull if you want to open link on you smartphone.

Installation

  • First of all you need to install python.
  • Then install dependencies python -m pip install -r requirements.txt.
  • Make qr.py easy to reach.
@koutoftimer
koutoftimer / README.md
Last active Oct 24, 2018
Extract *.m3u8 playlist urls from link to anime page on online.anidub.com
View README.md

Скрипт позволяет создать плейлист в формате \*.m3u для просмотра аниме с https://online.anidub.com/

Использование

Для создания плейлиста нужно выполнить скрипт с двумя параметрами: ссылку на страницу аниме (например [это][1]) и путь куда сохранять плейлист (например /tmp/pl.m3u). Команда будет иметь вид

$ python3 extract.py --output pl.m3u \
    --url "https://online.anidub.com/anime/10415-galakticheskie-zheleznye-dorogi-ginga-tetsudou-monogatari-01-iz-26.html"
@koutoftimer
koutoftimer / bot.js
Created Sep 20, 2018
Computer Evolution automation
View bot.js
window.bot = function() {
let bot = {};
bot.init = function init() {
let selectButton = document.createElement('button')
, selectEl = document.createElement('select');
initElements();
appendBody();
addEvents();
View index.html
{% extends 'base.html' %}
{% load static %}
{% block title %}{{ index.title }}{% endblock %}
{% block head %}
<style>
html {
background: {{ index.bg_color }} url("{{ index.image.url }}") no-repeat center fixed;
background-size: cover;
@koutoftimer
koutoftimer / tmux.conf
Created Mar 7, 2018
tmux configuration file
View tmux.conf
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Change <command> key
unbind C-b
set -g prefix `
# Send "`" to the terminal by double pressing command key <`>
set-option -g prefix `
@koutoftimer
koutoftimer / dec.py
Created Feb 21, 2018
Decrypt GPG encrypted mail
View dec.py
#!/usr/bin/env python3
import sys
import quopri
import subprocess as sp
def main():
#: Retrieve mail from the clipboard.
#: Depends on your system configuration.
encrypted = sp.Popen(['xclip', '-o'], stdout=sp.PIPE)
View Factory Idle Hack File.js
!function() {
/*
RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
/**
* @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.