Skip to content

Instantly share code, notes, and snippets.

View pticon's full-sized avatar

Pticon pticon

View GitHub Profile
#!/bin/bash
wget http://ipinfo.io/ip -qO -
@pticon
pticon / vulnsmall.sh
Created May 7, 2016 10:11
Find vulnerable suid executable
#!/bin/sh
tempfile="/tmp/$0.$$"
trap "rm $tempfile" 0
find / \( -type f -a -user root -a -perm -4001 \) -print > $tempfile
for file in `cat $tempfile`; do
strings -a $file | awk '/^gets$|^strcpy$|^strcat$|^sprintf$/\
#!/bin/bash
tcpdump -i wlan2 port http or port ftp or port smtp or port imap or port pop3 -l -A | egrep -i 'pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd=|password=||name=|name:|pass:|user:|username:|password:|login:|pass |user ' --color=auto --line-buffered -B20
@pticon
pticon / noscreensaver.sh
Created May 24, 2016 18:32
disable screensaver
xset -dpms; xset s noblank; xset s off
#!/bin/bash
# enable ip forwarding
sudo sysctl -w net.ipv4.ip_forward=1
# enable ip masquerade
sudo /sbin/iptables -F
sudo /sbin/iptables -F -t nat
sudo /sbin/iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to 172.16.2.187
@pticon
pticon / abv_calc.py
Created July 28, 2019 19:58
A python script used with my beer homebrewing in order to compute the final ABV (alcohol by volume).
#!/usr/bin/env python3
#
# A script to compute the ABV from OG and FG and the additional sugar.
#
import sys
import argparse
DESC="Compute the ABV (alcohol by volume) from the OG (original density) and FG (final density)."
@pticon
pticon / install_spotify.sh
Created October 14, 2020 17:11
How to install Spotify on Debian 10
#!/bin/bash
# Install Spotify from the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
# Update the repo
sudo apt-get update
# An error occured about the PUBKEY
# Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
@pticon
pticon / README.md
Created February 6, 2021 01:25 — forked from Luzifer/README.md
Running docker-compose as a systemd service

Running docker-compose as a systemd service

Files

File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose