Skip to content

Instantly share code, notes, and snippets.

// Generated by Grunt
// ==UserScript==
// @name StyleChan
// @version 1.0.15
// @namespace StyleChan
// @description Customizable themes for 4chan X.
// @minGMVer 1.14
// @minFFVer 26
// @license GPL-3.0; https://github.com/nebukazar/StyleChan/blob/master/LICENSE
// @match *://boards.4chan.org/*
@JekaDeka
JekaDeka / rsa.py
Last active May 15, 2024 05:40
A simple RSA implementation in Python
'''
620031587
Net-Centric Computing Assignment
Part A - RSA Encryption
'''
import random
'''
@underr
underr / 8ch-downloader.py
Created July 16, 2015 05:48
8chan Downloader - Requires the requests module
#!/usr/bin/python3
# Use: ./8ch-downloader.py <thread url>
import requests, os, json, sys
def download(url, name, subject_path):
filepath = subject_path + '/' + name
if not os.path.exists(filepath):
print('Get got: ' + name)
r = requests.get(url, stream=True)
with open(filepath, 'wb') as f:
@DrLulz
DrLulz / mpv-bookmarks.lua
Last active June 9, 2022 11:57
Creates .edl file for MPV player used here as a bookmarked playlist. Binds "x" so that first press is start of "bookmark" and second press is end of "bookmark." The file produced can then be played using "mpv --playlist=file.edl".
function file_exists(playlist)
local f=io.open(playlist, "r")
if f~=nil then io.close(f) return true else return false end
end
function entry_complete(playlist)
local f=io.open(playlist, "r")
chars = f:read("*all")
last_char = string.sub(chars, -1)
if last_char == ";" then io.close(f) return true else return false end
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 2a75365..b466ab2 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -81,6 +81,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <locale.h>
+#include <math.h>
@jcordeiro
jcordeiro / svg2png.sh
Created April 10, 2015 21:44
Iterates through a directory of .svg images and converts them to .png images. Requires the inkscape command line tool to be installed.
#!/bin/sh
for i in *.svg
do
IFS='.' read -a array <<< "$i"
inkscape -f "$i" -e "${array[0]}.png"
rm $i
@Zehkul
Zehkul / Convert Script – README.md
Last active December 16, 2023 07:19
Script to quickly convert and crop videos from within mpv

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@blacklight
blacklight / mpdrand
Created October 17, 2013 19:01
Script for loading and playing a random album from your MPD playlist using python-mpd2 API
#!/usr/bin/python
from mpd import MPDClient
from random import randint, shuffle
client = MPDClient()
client.connect('localhost', 6600)
albums = client.list("album")
shuffle(albums)
#!/usr/bin/php
<?php
/* Transmission to Deluge export script
*
* Transmission - transmission-gtk 2.77 (14031)
* Deluge - deluge: 1.3.6
* Script - PHP 5.4.14 (cli)
*
* How to use this script;
* 1) Run `php trans_to_deluge.php` and make sure there aren't any errors.