Skip to content

Instantly share code, notes, and snippets.

View bersace's full-sized avatar

Étienne BERSAC bersace

View GitHub Profile
@tdd
tdd / gitconfig.ini
Last active February 5, 2025 14:57
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = [email protected]
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases
@mopemope
mopemope / gist:933755
Created April 21, 2011 05:12
bjoern and meinheld hello_world benchmark
ab -c 100 -n 10000 http://192.168.2.11:8000/
bjoern 1.1.1
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.2.11 (be patient)
Completed 1000 requests
@marcelom
marcelom / pysyslog.py
Created December 5, 2012 18:06
Tiny Python Syslog Server
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'
@XVilka
XVilka / TrueColour.md
Last active March 3, 2025 14:09
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@mitchwongho
mitchwongho / Docker
Last active September 23, 2024 12:09
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@amatellanes
amatellanes / celery.sh
Last active February 26, 2025 15:18
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@simlegate
simlegate / custom-error-page
Created October 31, 2014 05:35
Nginx return custom json
error_page 400 404 405 =200 @40*_json;
location @40*_json {
default_type application/json;
return 200 '{"code":"1", "message": "Not Found"}';
}
error_page 500 502 503 504 =200 @50*_json;
location @50*_json {
@kived
kived / aptly-process-incoming.py
Created March 3, 2015 22:44
aptly: import from .changes files
#!/usr/bin/env python3
REPO_FORMAT = 'eepa-{dist}-build'
import sys
import os, os.path
import hashlib
import subprocess
def parse_changes(filename):
@davoclavo
davoclavo / spacemacs-cheatsheet.md
Last active October 26, 2024 19:46 — forked from 526avijitgupta/spacemacs-cheatsheet.md
Spacemacs cheatsheet

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@ramnes
ramnes / config
Last active January 23, 2020 10:42
Modeless Uzbl config, à la Emacs
# Default locations
set cache_home = @(echo $XDG_CACHE_HOME)@
set config_home = @(echo $XDG_CONFIG_HOME)@
set data_home = @(echo $XDG_DATA_HOME)@
set prefix = @(echo $PREFIX)@
set scripts_dir = @data_home/uzbl:@prefix/share/uzbl/examples/data:scripts
# Default variables
set default_mode = insert
set fifo_dir = /tmp