Skip to content

Instantly share code, notes, and snippets.

@ummjackson
ummjackson / killabot.py
Created May 4, 2018 08:05
killabot v1 (wip)
# Requirements: pip install tweepy fuzzywuzzy python-Levenshtein
import tweepy
import re
from fuzzywuzzy import fuzz
# Credentials go here (generate at: https://apps.twitter.com)
auth = tweepy.OAuthHandler('consumer_key', 'consumer_secret')
auth.set_access_token('access_token', 'access_token_secret')
# Connect to Twitter
@sormy
sormy / libtorrent-sequential-download.patch
Created October 24, 2017 04:45
rtorrent/libtorrent sequential download patch
diff --git a/src/download/chunk_selector.cc b/src/download/chunk_selector.cc
index 850fec0f..248a29f9 100644
--- a/src/download/chunk_selector.cc
+++ b/src/download/chunk_selector.cc
@@ -82,7 +82,7 @@ ChunkSelector::update_priorities() {
m_sharedQueue.clear();
if (m_position == invalid_chunk)
- m_position = random() % size();
+ m_position = 0;
@pwaller
pwaller / nongnu.patch
Created June 1, 2016 12:59
Make clang sanitizers work under musl
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
index e26b400..9618933 100644
--- a/lib/asan/asan_linux.cc
+++ b/lib/asan/asan_linux.cc
@@ -39,7 +39,7 @@
#include <sys/link_elf.h>
#endif
-#if SANITIZER_ANDROID || SANITIZER_FREEBSD
+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_NONGNU
@groovenectar
groovenectar / roundedcube.scad
Last active September 23, 2024 21:28
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;
@wfr
wfr / gtk-filechooser-icon-view-master-2015-04-10-almost-complete.patch
Created April 10, 2015 09:21
gtk-filechooser-icon-view-rework, almost complete
diff --git a/gtk/gtkfilechooserprivate.h b/gtk/gtkfilechooserprivate.h
index e7b7053..54e3422 100644
--- a/gtk/gtkfilechooserprivate.h
+++ b/gtk/gtkfilechooserprivate.h
@@ -32,10 +32,12 @@
#include "gtktreestore.h"
#include "gtktreeview.h"
#include "gtkbox.h"
+#include "gtkiconview.h"
@jirutka
jirutka / webdav_treat_osx.conf
Created April 14, 2013 00:28
Nginx optimization for WebDAV access from OS X Finder. This config snippet ensures that nginx will ignore requests for useless dot files generated by the Finder (.DS_Store, ._*, …)
#
# Ignore requests for useless dot files generated by OS X Finder (WebDAV).
#
# This little hack speeds-up a WebDAV access from the Finder significantly and
# also prevents messing storage with these annoying files.
#
location ~ \.(_.*|DS_Store|Spotlight-V100|TemporaryItems|Trashes|hidden)$ {
access_log off;
error_log off;