Skip to content

Instantly share code, notes, and snippets.

@semeion
semeion / 50-battery.rules
Created May 17, 2019 — forked from gavinhungry/50-battery.rules
udev script for handling power management
View 50-battery.rules
SUBSYSTEM=="power_supply", ACTION=="change", RUN+="/etc/scripts/battery.sh"
@semeion
semeion / proc_net_tcp_decode
Created May 14, 2019 — forked from jkstill/proc_net_tcp_decode
decode entries in /proc/net/tcp
View proc_net_tcp_decode
Decoding the data in /proc/net/tcp:
Linux 5.x /proc/net/tcp
Linux 6.x /proc/PID/net/tcp
Given a socket:
$ ls -l /proc/24784/fd/11
lrwx------ 1 jkstill dba 64 Dec 4 16:22 /proc/24784/fd/11 -> socket:[15907701]
@semeion
semeion / netpps.sh
Created May 5, 2019 — forked from joemiller/netpps.sh
shell: quick linux scripts for showing network bandwidth or packets-per-second
View netpps.sh
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second
@semeion
semeion / curl-smtp-email.sh
Created Nov 1, 2015 — forked from james2doyle/curl-smtp-email.sh
Send SMTP email using cURL
View curl-smtp-email.sh
curl --connect-timeout 15 -v --insecure "smtp://smtp.example.com:25" -u "username:password"
\ --mail-from "sender@example.com" --mail-rcpt "destination@example.com"
\ -T email-contents.txt --ssl
View google.sh
#!/bin/bash
## uploading to google
## rev: 22 Aug 2012 16:07
det=`date +%F`
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1"
username="user@domain-apps.com"
password="password"
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE
You can’t perform that action at this time.