Skip to content

Instantly share code, notes, and snippets.

@Eyjafjallajokull
Eyjafjallajokull / raspberry-pi-headless.md
Last active August 10, 2020 18:25 — forked from rdmarsh/pi-tips.md
Clean up the Raspbian default build for the Raspberry Pi

Minimal Headless Raspberry Pi OS

After burning SD card, touch ssh on boot partition to enable ssh.

Default ssh credentials: pi : raspberry

Remove redundant stuff:

apt-get purge --auto-remove scratch debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk lightdm gnome-themes-standard gnome-icon-theme raspberrypi-artwork gvfs-backends gvfs-fuse desktop-base lxpolkit zenity xdg-utils mupdf gtk2-engines alsa-utils  lxde lxtask menu-xdg gksu midori xserver-xorg xinit xserver-xorg-video-fbdev libraspberrypi-dev libraspberrypi-doc dbus-x11 libx11-6 libx11-data libx11-xcb1 x11-common x11-utils lxde-icon-theme gconf-service gconf2-common
@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active August 19, 2024 20:03
AWS EBS - Find unused snapshots

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help
image = gimp.image_list()[0]
>>> for layer in image.layers:
... layer.name = layer.name.replace("200ms", "100ms")
...
>>> for layer in image.layers:
... pdb.gimp_levels(layer, 0, 6, 211, 1.27, 0, 255)

docker-carrier

Note: This is just a proof of concept (aka. crazy idea). Feedback is very welcome. Please share your thoughts.

docker-carrier makes it super easy to run containerized applications.

Features

  • Easily install and run containerized applications
  • Run multiple versions of the same application
@Eyjafjallajokull
Eyjafjallajokull / varnishlogparser.py
Created November 20, 2014 11:10
varnishlog parser
import sys
import re
# varnishlog | python varnishlogparser.py '.*mohito.com.*' | python varnishlogparser.py '.*URL.* /$'
history = []
current_id = None
match_id = None
regex = sys.argv[1]
def get_id(line):
__author__ = 'pawel'
from paramiko import *
import select
from time import sleep
private = RSAKey.generate(2048)
private.write_private_key_file('private')
print private.get_base64()
exit(0)
@Eyjafjallajokull
Eyjafjallajokull / gist:8983383
Created February 13, 2014 20:40
Android 4.4 KitKat on Samsung Galaxy S2 i9100
  • copy
    • kernel-cm-10.2-20131112-i9100-signed.zip
    • omni-4.4.2-20140209-i9100-NIGHTLY.zip
    • GApps_Standard_4.4.2_signed.zip to /storage/sdcard0
  • run recovery mode
  • install uploaded first zip
  • restart to recovery mode
  • install omni and then gapps