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
@krimdomu
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:
@abhiyerra
abhiyerra / .muttrc
Created January 2, 2011 05:05
Mutt for Gmail
# Change the following six lines to match your Gmail account details
set imap_user = "ykabhinav@gmail.com"
# set imap_pass = "PASSWORD"
set smtp_url = "smtp://ykabhinav@gmail.com@smtp.gmail.com:587/"
# set smtp_pass = "PASSWORD"
set realname = "Abhi Yerra"
set from = "ykabhinav@gmail.com"
@bfg
bfg / apache-2.2-mod_remoteip.c
Created June 23, 2011 09:32
Working backport (doesn't crash when using Allow/Deny ACLs) of Apache 2.3 module mod_remoteip to Apache 2.2.x
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#!/bin/bash
res=$(zenity --list --text="Choose a screen size" --column="Choice" --column="Resolution" --radiolist FALSE "1680x1050" TRUE "3360x1050" --separator=":")
if [ $? ] ; then
xrandr --size $res
fi
@jbeluch
jbeluch / .screenrc
Created November 17, 2010 14:53
Basic .screenrc
startup_message off
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{..G}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a"
#!/usr/bin/env python3
"""syslogreceiver.py - receive remote syslog events and pass them into
systemd's journal"""
import re
import socketserver
from systemd import journal
HOST, PORT = "0.0.0.0", 514
@gdamjan
gdamjan / chrome-headless.service
Created September 13, 2017 18:28
headless chrome systemd service file
[Unit]
Description=headless chrome
[Service]
Type=simple
ProtectSystem=strict
DynamicUser=true
Environment=HOME=/tmp
ExecStart=/usr/bin/google-chrome --headless --disable-gpu --remote-debugging-port=9222
@pklaus
pklaus / dnsupdate.py
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 http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/
#
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com.
# -h HELP!
# -s the server
# -k the key
@mads-hartmann
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"
(interactive)
(if (= 1 (length (window-list)))
(jump-to-register '_)
(progn
(set-register '_ (list (current-window-configuration)))
(delete-other-windows))))
;; Bind it to a key.
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl