Install the OpenSSL on Debian based systems
sudo apt-get install openssl
task "mytask", sub { | |
my $param = shift; | |
say $param->{param1}; | |
say $param->{param2}; | |
}; | |
# call with: |
# 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" |
/* 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 |
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 |
[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 |
#!/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 |
(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. |