Skip to content

Instantly share code, notes, and snippets.

View icanwalkonwater's full-sized avatar
🚂
I like trains

Lucas Malandrino icanwalkonwater

🚂
I like trains
  • Grenoble INP - ENSIMAG
  • France
View GitHub Profile
@icanwalkonwater
icanwalkonwater / setup.sh
Last active November 19, 2018 08:42
Play ~aproximatively~ the melody when you open a chest in zelda games with the beeper of your pc. (you need to run it as root).
#!/bin/sh
gcc zelda_beep.c -o zelda_beep
# set the setuid bit to allow anyone to run this as root
sudo chown root:root zelda_beep
sudo chmod 4755 zelda_beep
./zelda_beep
@icanwalkonwater
icanwalkonwater / tree_folder.py
Last active August 29, 2018 16:53
Print a tree of your folder and its subfolders and files.
#!/bin/python
import os
PREFIX_LINE = '+--- '
PREFIX_END = '\--- '
SPACE = ' '
def main():
@icanwalkonwater
icanwalkonwater / gimp_gif_rotate.py
Last active August 30, 2018 12:45
A gimp plugin that allows you to create a rotating gif from your selected layer.
#!/usr/bin/env python
from gimpfu import *
import math
def python_gif_rotate(image, base_layer, rotation=360, amount=60, time=1000, clockwise=True,
center_auto=True, center_x=0, center_y=0, auto_resize=True):
step_rot = rotation / amount
if not clockwise: