Skip to content

Instantly share code, notes, and snippets.

@ZhuoyunZhong
ZhuoyunZhong / 01_Overview.md
Last active May 2, 2025 14:57
Include only parts of others' repository as submodule in your project and arrange them to desired locations.

This gist provides an example of how to only include parts of others' repository as submodule in your project.

What is more, it will also show how to "put" the folders of submodule to desired location (e.g. under your project's root), without breaking the submodule.

Consider we have a repository

Simulation

  • README.md

There is one another repository we want to use, but only the algorithm folder is needed.

@glilco
glilco / RenderServerSetting.md
Last active June 6, 2025 12:32
Setting up a render server for kdenlive projects with docker

I am documenting my experience creating a render server for the kdenlive project using Docker. Although some of the findings are not optimal, they are the solutions I found to the problems. I believe that this information will be useful to other people with similar issues.

The Scenario

There was a server available with four GeForce GTX Titan Black GPUs, running Debian 9 Stretch. However, the system was outdated, and I could not upgrade it since other users were running projects on that server.

First attempts

My first attempt was to install ffmpeg and melt, but I couldn't because the apt sources were outdated. I then tried to enable backport repositories, but I was unable to install the packages.

@Ircama
Ircama / PT-P300BT.md
Last active May 23, 2025 14:56
Print to Brother PTP300BT from a computer
@sk22
sk22 / lastfm-remove-duplicates.js
Last active May 21, 2025 05:27
Last.fm duplicate scrobble deleter
var elements = Array.from(document.querySelectorAll('.js-link-block'))
elements.map(function (element) {
var nameElement = element.querySelector('.chartlist-name')
return nameElement && nameElement.textContent.replace(/\s+/g, ' ').trim()
}).forEach(function (name, i, names) {
if (name !== names[i + 1]) return
var deleteButton = elements[i].querySelector('[data-ajax-form-sets-state="deleted"]')
if (deleteButton) deleteButton.click()
location.reload()
})
@trent2
trent2 / unob_spiegelplus.user.js
Last active February 22, 2022 06:47
Unobfuscate SPIEGEL plus articles with greasemonkey
// ==UserScript==
// @name unobfuscate spiegel plus
// @namespace obfuscate
// @include http://www.spiegel.de/*
// @version 1
// @grant none
// ==/UserScript==
if(document.getElementsByClassName('obfuscated-content')[0] != undefined) {
document.getElementsByClassName('obfuscated-content')[0].setAttribute("class", "");
var elems = document.getElementsByClassName('obfuscated'), t, or, c, i, cc;
@jburgess777
jburgess777 / getButton.py
Created February 23, 2016 23:11
Script to find a Bluetooth camera remote and print the button events
#!/usr/bin/env python
import sys
import evdev
devices = [evdev.InputDevice(fn) for fn in evdev.list_devices()]
if len(devices) == 0:
print "No devices found, try running with sudo"
sys.exit(1)
@groovenectar
groovenectar / roundedcube.scad
Last active June 2, 2025 10:00
roundedcube.scad - Fork me and make me better!
// More information: https://danielupshaw.com/openscad-rounded-corners/
// Set to 0.01 for higher definition curves (renders slower)
$fs = 0.15;
module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") {
// If single value, convert to [x, y, z] vector
size = (size[0] == undef) ? [size, size, size] : size;
translate_min = radius;
#!/usr/bin/env python
"""IMAP Incremental Backup Script v.1.4c (Dec 12 2009) found on http://the.taoofmac.com/space/Projects/imapbackup"""
__version__ = "1.4c"
__author__ = "Rui Carmo (http://the.taoofmac.com)"
__copyright__ = "(C) 2006 Rui Carmo. Code under BSD License.\n(C)"
__contributors__ = "Bob Ippolito, Michael Leonhard, Giuseppe Scrivano <[email protected]>, Ronan Sheth, Brandon Long"
# = Contributors =
# Brandon Long (Gmail team): Reminder to use BODY.PEEK instead of BODY