Skip to content

Instantly share code, notes, and snippets.

@sbz
sbz / lcap.c
Last active January 26, 2024 14:33
example of using linux capabilities interface libcap(3) and dump capabilities flags for the running process
#include <sys/capability.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define nitems(x) (sizeof(x) / sizeof(x[0]))
int
main(void) {
@r2k0
r2k0 / sed_snippets.sh
Last active June 15, 2024 18:09
sed examples
##FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# triple space a file
@shreeshga
shreeshga / sed.txt
Created September 26, 2012 17:57
sed quick help guide
HANDY ONE-LINERS FOR SED (Unix stream editor) Oct. 29, 1997
compiled by Eric Pement <epement@jpusa.chi.il.us> version 4.3
Latest version of this file is always at <http://www.wollery.demon.co.uk>
FILE SPACING:
# double space a file
sed G
# triple space a file
sed 'G;G'
@a1phanumeric
a1phanumeric / gist:5346170
Created April 9, 2013 14:35
Grep exclusions. Demonstrates how to exclude multiple directories, and files.
grep -r --color --exclude-dir={custom,lib,scripts} --exclude={*.xml,error_log} "beta" .
@mgiraldo
mgiraldo / a-web-maps-101.md
Last active August 22, 2018 11:34
A web maps primer

#A web maps primer

I was invited to the National Library of Colombia's 2nd Digital Book Week as a speaker and to give a workshop on digital mapping tools. I thought it would be useful to share that workshop since it encompasses a lot of different processes and tools that make digital cartography today very accessible. It is a primer on working with various free web mapping tools so you can make your own awesome maps.

##TL;DR You will make [this][result]. This tutorial assumes you have a digitized map and some data you want to overlay on it. The general steps covered are:

  1. geo-referencing the scanned map so that web tiles can be generated
  2. generating GeoJSON data to be overlaid
  3. creating a custom base map (to serve as reference/present day)
@kdevo
kdevo / IntelliJ + Maven - Unresolved Plugin.md
Last active March 1, 2024 09:03
IntelliJ IDEA and Maven - "Unresolved Plugin" notes