Skip to content

Instantly share code, notes, and snippets.

View RonjaPonja's full-sized avatar
💭
🧠🔥

Ronja Meyer RonjaPonja

💭
🧠🔥
View GitHub Profile
@geoffb
geoffb / simple_websocket_client.html
Created October 7, 2010 23:37
Super simple websockets client/server using Python. Compatible with the draft 76 challenge/response.
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>
@jhass
jhass / nginx.conf
Last active May 12, 2022 02:13
Nginx Diaspora reverse proxy. - This is not a complete Nginx configuration! It only shows the relevant parts for integrating Diaspora.
# This is not a complete Nginx configuration! It only shows the relevant parts for integrating Diaspora.
# [...]
http {
# Your standard server configuration goes here
# [...]
gzip_static on;
@yinyin
yinyin / endian.h
Created March 13, 2012 09:51
BSD/Linux-like <endian.h> for MacOS X
#ifndef __FINK_ENDIANDEV_PKG_ENDIAN_H__
#define __FINK_ENDIANDEV_PKG_ENDIAN_H__ 1
/** compatibility header for endian.h
* This is a simple compatibility shim to convert
* BSD/Linux endian macros to the Mac OS X equivalents.
* It is public domain.
* */
#ifndef __APPLE__
@zachbrowne
zachbrowne / cloud9.sh
Created May 9, 2012 14:47
Bash Script to Install Node.js and Cloud9 IDE on Ubuntu
#!/bin/sh
#######################################################
# Another great script by: #
# _ , _ #
# / ) _, _ |) /|/_) ,_ _ _ #
# / / | / |/\ | \/ | / \_| | |_/|/| |/ #
# /__/\/|_/\__/| |/|(_/ |/\_/ \/ \/ | |_/|_/ #
# (| #
# #
@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
-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)).
@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
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);
#!/usr/local/bin/python3.2
import encodings
import os
import re
import subprocess
import syslog
import sys
import time
! 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