Skip to content

Instantly share code, notes, and snippets.

View mtrsk's full-sized avatar
🛠️
Tinkering

Marcos Benevides mtrsk

🛠️
Tinkering
View GitHub Profile
@jonashaag
jonashaag / realapp.py
Created December 7, 2010 14:03
WSGI middleware that automatically reloads the wrapped app if it changes
def app(env, start_response):
start_response('200 ok', [])
return 'hello\n'
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@endolith
endolith / output.png
Last active April 18, 2024 04:22
Detecting rotation and line spacing of image of page of text using Radon transform
output.png
## Alexey Kachayev, 2014
## Link to slides:
## http://goo.gl/n4ylC4
## Basic:
## type Parser = String -> Tree
## Composition
## type Parser = String -> (Tree, String)
@jasonwhite
jasonwhite / pulsetest.cc
Last active April 23, 2024 06:26
A simple PulseAudio test program for monitoring volume changes on the default sound sink.
/**
* Author: Jason White
* License: Public Domain
*
* Description:
* This is a simple test program to hook into PulseAudio volume change
* notifications. It was created for the possibility of having an automatically
* updating volume widget in a tiling window manager status bar.
*
* Compiling:
@adham90
adham90 / spacemacs-keybindings
Last active April 5, 2024 14:24
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@magnetikonline
magnetikonline / README.md
Last active February 4, 2024 07:45
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
@EricDuminil
EricDuminil / trie.py
Last active December 31, 2023 06:04 — forked from atiking/regexp-trie.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#author: rex
#blog: http://iregex.org
#filename trie.py
#created: 2010-08-01 20:24
#source uri: http://iregex.org/blog/trie-in-python.html
# escape bug fix by fcicq @ 2012.8.19
@pjones
pjones / autosshfs.nix
Created March 28, 2017 19:20
autofs + sshfs NixOS module.
# Configure autofs for mounting sshfs mounts as a specific user.
#
# Heavily inspired by https://github.com/hellekin/autosshfs
{ config, pkgs, lib, ...}: with lib;
let
cfg = config.pjones.services.autosshfs;
mkdir = "${pkgs.coreutils}/bin/mkdir";
##############################################################################