Skip to content

Instantly share code, notes, and snippets.

@mikeboiko
mikeboiko / tmux.conf
Last active March 23, 2024 07:32
Automatically update $DISPLAY for each tmux pane after attaching to session
set-hook -g client-attached 'run-shell /bin/update_display.sh'
@Aethylred
Aethylred / gist:0ea0d2899eca1da790aa078f9f2a885a
Last active October 31, 2023 20:52
freeipa-api-ansible-inventory
#!/usr/bin/env python
# This script uses the FreeIPA API to create an Ansible dynamic directory
# This is a shell script version of freeipa-api-inv.py
#
# DEPENDENCIES: before this script will work with AWX or Tower
# the python_freeipa module has to be installed
#
# Add this to your Docker image
# RUN pip install python_freeipa
#
nginx conf for proxying the FreeIPA UI. ipa.my.org is the proxy name, realipa.my.org is the master.
server {
listen 443 ssl;
server_name ipa.my.org;
ssl on;
ssl_certificate /etc/nginx/ssl/ipa.crt;
ssl_certificate_key /etc/nginx/ssl/ipa.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AES256+EECDH:AES256+EDH:AES128+EECDH!aNULL;
@TheSeamau5
TheSeamau5 / NewRecordEntityComponentSystem.elm
Last active June 12, 2017 03:23
Example under the New Record Entity Component System
import List (map, (::))
import Color (Color, rgb)
import Keyboard (arrows)
import Signal (Signal, (<~), foldp)
import Graphics.Collage (square, circle, move, filled, collage, Form)
import Graphics.Element (Element)
type alias Vector = {
x : Float,
y : Float
@toomuchpete
toomuchpete / header_timer.py
Last active August 29, 2015 14:03
Time header responses from http/https requests
import socket, ssl, sys, time
from pprint import pprint as pp
from urlparse import urlparse
if len(sys.argv) != 2:
print "ERROR: You must supply a url to profile."
sys.exit(-2)
url = sys.argv[1]
@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@gmccreight
gmccreight / master.vim
Last active June 19, 2024 15:30
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)