Skip to content

Instantly share code, notes, and snippets.

View jamespo's full-sized avatar
Working from home

J.P jamespo

Working from home
View GitHub Profile
#!/usr/bin/env python3
""" - receive remote syslog events and pass them into
systemd's journal"""
import re
import socketserver
from systemd import journal
HOST, PORT = "", 514
gdamjan / chrome-headless.service
Created September 13, 2017 18:28
headless chrome systemd service file
Description=headless chrome
ExecStart=/usr/bin/google-chrome --headless --disable-gpu --remote-debugging-port=9222
p3t3r67x0 /
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys



Install the OpenSSL on Debian based systems

sudo apt-get install openssl
rudelm /
Last active April 10, 2024 17:58
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

# Automounter master map

+auto_master # Use directory service

josephspurrier / values_pointers.go
Last active April 10, 2024 00:46
Golang - Asterisk and Ampersand Cheatsheet
Golang - Asterisk and Ampersand Cheatsheet
Also available at:
p := Person{"Steve", 28} stores the value
krimdomu / gist:9394089
Created March 6, 2014 16:50
task params
task "mytask", sub {
my $param = shift;
say $param->{param1};
say $param->{param2};
# call with:
wandernauta / sp
Last active April 16, 2024 15:37
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
bkdinoop / login-example
Last active April 8, 2024 07:05
Flask-Login : created by : Matthew Frazier
# -*- coding: utf-8 -*-
Flask-Login example
This is a small application that provides a trivial demonstration of
Flask-Login, including remember me functionality.
:copyright: (C) 2011 by Matthew Frazier.
:license: MIT/X11, see LICENSE for more details.
pklaus /
Last active November 14, 2023 23:50
dnsupdate is meant to replace nsupdate, the standard DDNS update tool created by BIND authors ISC. While nsupdate does the job it is awkward to wrap in scripts and its usage in general is just not very intuitive. dnsupdate is meant to work well from the command line or from scripts and easy to use. It also does some nice things like automaticall…
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
# See
# Usage: dnsupdate -s server -k key -t ttl add SRV 0 0 25566
# -h HELP!
# -s the server
# -k the key
mads-hartmann / toggle-maximize-buffer.el
Created August 20, 2012 10:05
An Emacs function to temporarily make one buffer fullscreen. You can quickly restore the old window setup.
(defun toggle-maximize-buffer () "Maximize buffer"
(if (= 1 (length (window-list)))
(jump-to-register '_)
(set-register '_ (list (current-window-configuration)))
;; Bind it to a key.