Skip to content

Instantly share code, notes, and snippets.

View RhinoDevel's full-sized avatar
🦏

RhinoDevel RhinoDevel

🦏
View GitHub Profile
public class NancyGzipCompression : IApplicationStartup
{
public void Initialize(IPipelines pipelines)
{
pipelines.AfterRequest += CheckForCompression;
}
private static void CheckForCompression(NancyContext context)
{
if (!RequestIsGzipCompatible(context.Request))
#!/bin/bash -xv
### Country list
# CHANGE WITH YOUR COUNTRIES
COUNTRIES="europe/france/guadeloupe europe/france/guyane europe/france/mayotte europe/france/martinique europe/france/reunion europe/france"
# SMALL SUBSET FOR TESTING:
COUNTRIES="europe/france/guyane europe/france/mayotte"
NOMINATIM="/var/www/Nominatim"
cd $NOMINATIM/data
@kevinxucs
kevinxucs / gmux-switch.c
Created May 11, 2014 07:05
Power down discrete graphic chip on apple gmux
#include <stdio.h>
#include <sys/io.h>
#define GMUX_PORT_SWITCH_DISPLAY 0x10
#define GMUX_PORT_SWITCH_DDC 0x28
#define GMUX_PORT_SWITCH_EXTERNAL 0x40
#define GMUX_PORT_DISCRETE_POWER 0x50
#define GMUX_PORT_VALUE 0xc2
#define GMUX_PORT_READ 0xd0
#define GMUX_PORT_WRITE 0xd4
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2024 06:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname