Skip to content

Instantly share code, notes, and snippets.

View RonjaPonja's full-sized avatar
💭
🧠🔥

Ronja Meyer RonjaPonja

💭
🧠🔥
View GitHub Profile
@karlp
karlp / MANIFEST.in
Created August 16, 2013 08:37
Including git version in setup.py files. (Requires at least _one_ tag in the repo) Normally used to make things like, "python setup.py sdist" give you a predictable name for files. Normally used with tags on the repo like 0.1 or 2.3.0 You should add RELEASE-VERSION to MANIFEST.in so that end users of the tarball can use this too.
include RELEASE-VERSION
include version.py
# Anything else you normally use
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active May 20, 2025 07:59
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@jhass
jhass / dump_socket.sh
Last active June 11, 2024 13:15
Capture unix socket to pcap file with socat and tshark
#!/bin/bash
# Parameters
socket="/run/foo.sock"
dump="/tmp/capture.pcap"
# Extract repetition
port=9876
source_socket="$(dirname "${socket}")/$(basename "${socket}").orig"
@caidurbin
caidurbin / .gitignore
Created June 3, 2013 21:36
.gitignore for Android Studio which allows the project to be re-created on another machine.
# Ignored by AndroidStudio
*.iws
# Folders related to builds
.gradle/
*/build/
# Local settings (regenerated by Android Studio)
.idea/workspace.xml
local.properties
! turn the scroll wheel upside-down
pointer = 1 2 3 5 4
! make CapsLock work as modbutton3
keycode 66 = Hyper_L
clear lock
clear mod3
clear mod4
#!/usr/local/bin/python3.2
import encodings
import os
import re
import subprocess
import syslog
import sys
import time
diff --git a/src/db.cpp b/src/db.cpp
index e494d28..8347208 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -88,7 +88,7 @@ bool CDBEnv::Open(boost::filesystem::path pathEnv_)
dbenv.set_errfile(fopen(pathErrorFile.string().c_str(), "a")); /// debug
dbenv.set_flags(DB_AUTO_COMMIT, 1);
dbenv.set_flags(DB_TXN_WRITE_NOSYNC, 1);
- dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1);
+ // dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1);
@richieforeman
richieforeman / makeauthority.sh
Created July 23, 2012 21:38
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
-module(p3).
-export([prime_sieve/1, solution/0, solution/1]).
% generate a list of all primes smaller than N
prime_sieve(N) when is_integer(N) ->
prime_sieve([ 2 ] ++ [ X || X <- lists:seq(3, N) ]);
prime_sieve([]) -> [];
prime_sieve([H|C]) ->
[ H ] ++ prime_sieve(lists:filter(fun(X)-> (X rem H) /= 0 end, C)).
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off