Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Contributing to FOSS

Sefa Eyeoglu Scrumplex

💻
Contributing to FOSS
View GitHub Profile
@Scrumplex
Scrumplex / 50-udisks.rules
Last active May 9, 2021
Polkit rules for udisks, and udisks2. Compatible with udiskie and Dolphin.
View 50-udisks.rules
// Original rules: https://github.com/coldfix/udiskie/wiki/Permissions
// Changes: Added org.freedesktop.udisks2.filesystem-mount-system, as this is used by Dolphin.
polkit.addRule(function(action, subject) {
var YES = polkit.Result.YES;
// NOTE: there must be a comma at the end of each line except for the last:
var permission = {
// required for udisks1:
"org.freedesktop.udisks.filesystem-mount": YES,
"org.freedesktop.udisks.luks-unlock": YES,
@Scrumplex
Scrumplex / sharex_uploader.sxcu
Last active Dec 23, 2019
ShareX Uploader (PHP)
View sharex_uploader.sxcu
{
"Name": "example.com",
"DestinationType": "None",
"RequestType": "POST",
"RequestURL": "http://example.com/upload.php",
"FileFormName": "upload",
"Arguments": {
"password": "password"
},
"ResponseType": "Text"
@Scrumplex
Scrumplex / kill-steam.sh
Created Jan 10, 2018
Kill Steam on Desktop exit
View kill-steam.sh
#!/bin/bash
_term() {
pkill -f -9 $HOME/.local/share/Steam/ubuntu12_32/steam
}
trap _term EXIT
sleep infinity
@Scrumplex
Scrumplex / clock.yt.js
Created Nov 29, 2017
YouTube Clock JS
View clock.yt.js
function clock() {
var time = new Date(),
hours = time.getHours(),
minutes = time.getMinutes(),
seconds = time.getSeconds();
document.querySelectorAll('.clock')[0].innerHTML = harold(hours) + ":" + harold(minutes) + ":" + harold(seconds);
function harold(standIn) {
if (standIn < 10) {
standIn = '0' + standIn
View YouTube Logo Redirect
document.getElementById('logo-container').href = '/feed/subscriptions';