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
@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 = []
@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
@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;
}
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@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;
@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:
@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