Skip to content

Instantly share code, notes, and snippets.

View szaydel's full-sized avatar

Sam Zaydel szaydel

  • RackTop Systems
  • Moss Beach
View GitHub Profile
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active February 27, 2024 14:08
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
@jaypeche
jaypeche / fanotify-example.c
Created December 20, 2014 10:48
fanotify example
/*
* File: fanotify-example.c
* Date: Fri Nov 15 14:55:49 2013
* Author: Aleksander Morgado <aleksander@lanedo.com>
*
* A simple tester of fanotify in the Linux kernel.
*
* This program is released in the Public Domain.
*
* Compile with:
@szaydel
szaydel / getdefaultproj.c
Last active March 2, 2017 19:25
Solaris SMF, Projects and Security Snippets
/*
* CC=/opt/gcc-5.1.0/bin gcc -m64 -o getdefaultproj -Wall -lproject getdefaultproj.c
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <project.h>
struct project proj;
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@ChrisBeaumont
ChrisBeaumont / custom.css
Last active June 22, 2022 15:20
Demystifying Python Descriptors
<style>
@font-face {
font-family: "Computer Modern";
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');
}
div.cell{
width:800px;
margin-left:16% !important;
margin-right:auto;
}
@charlesflynn
charlesflynn / gist:5576114
Last active March 2, 2018 16:02
Resuming an existing Devstack installation on Ubuntu after reboot (assuming you have NOT run unstack.sh). IP addresses are the defaults used by stack.sh. In this example I'm using postgres as the database backend rather than the default mysql.
sudo ip addr flush dev br-ex
sudo sysctl -w net.ipv4.ip_forward=1
sudo ip addr add 172.24.4.225/28 dev br-ex
sudo ip link set br-ex up
sudo route add -net 10.0.0.0/24 gw 172.24.4.226
sudo service rabbitmq-server start
sudo service postgresql start
sudo service apache2 start
export SERVICE_TOKEN=password
export OS_TENANT_NAME=demo
@matthewstory
matthewstory / gist:4547282
Last active January 20, 2022 15:05
Simple Pre-Forked Python JSON-RPC Server
import os
import signal
import sys
import select
import errno
from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer
# BOOK-KEEPING
_PIDS = []
@bobthecow
bobthecow / rules.rb
Last active April 27, 2023 16:43
Maid rules
# https://github.com/benjaminoakes/maid
Maid.rules do
## Trash a bunch of downloaded stuffs ##
rule 'Trash duplicate downloads' do
# Keep the dupe with the shortest filename
trash verbose_dupes_in('~/Downloads/*')
end
@joshenders
joshenders / gist:3976698
Last active November 7, 2015 07:15 — forked from vena/gist:2856490
How to install Netatalk 3.1.6 under Debian Wheezy

1. Install dependencies

apt-get install automake avahi-daemon build-essential checkinstall db5.1-util db-util git-core libacl1-dev libavahi-client-dev libdb5.1-dev libgcrypt11 libgcrypt11-dev libpam0g-dev libtool pkg-config

2. Download and unpack source

cd /usr/src/
wget http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.6.tar.gz
tar -xvzf netatalk-3.1.6.tar.gz