Skip to content

Instantly share code, notes, and snippets.

View shantigilbert's full-sized avatar

shantigilbert

View GitHub Profile
@shantigilbert
shantigilbert / switch.sh
Last active August 15, 2021 19:40
Script to run at boot and uses a switch to select timelapse.sh or the RPI Camera Web Interface
#!/bin/bash
# RPI Camera Web Interface should be cloned in /home/pi/RPi_Cam_Web_Interface and needs to already be installed, using nginx!
# This file (switch.sh) needs to be in /home/pi/switch.sh
#
# Changes needed to /etc/rc.local
#
# # We need to comment out the autostart for the RPI Camera Web Interface (if available)
# #START RASPIMJPEG SECTION
# #mkdir -p /dev/shm/mjpeg
# #chown www-data:www-data /dev/shm/mjpeg
@shantigilbert
shantigilbert / timelapse.sh
Last active August 5, 2021 04:20
Small script to create timelapses with the Raspberry Pi (Zero W) using Raspistill
#!/bin/bash
# Edit interval (in seconds), number of photos and arguments from raspistill --help
INTERVAL=5
NUMPHOTOS=10000
#ARGS="-n -vf -hf -w 1920 -h 1080"
ARGS="-n -vf -hf -w 2592 -h 1458"
DATE=$(date +"%Y-%m-%d_%H%M_%s")
https://online-toolz.com/tools/xslt-transformation.php
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="no" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="systemList">
<systemList>
<xsl:for-each select="system">
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="no" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="systemList">
<systemList>
<xsl:for-each select="system">
<xsl:sort select="fullname"/>
<system>
#!/bin/sh
LINK="https://github.com/Retro-Arena/binaries/raw/master/odroid-xu4/drastic.tar.gz"
ES_FOLDER="/storage/.emulationstation"
LINKDEST="$ES_FOLDER/scripts/drastic.tar.gz"
CFG="$ES_FOLDER/es_systems.cfg"
EXE="$ES_FOLDER/scripts/drastic.sh"
mkdir -p "$ES_FOLDER/scripts/"
@shantigilbert
shantigilbert / convert_xtras.sh
Last active February 13, 2019 03:45
Convert xtras (from emuxtras) Synopsis to gamelist.xml for Emulationstation
#!/bin/bash
# This is a simple script will attempt to create a gamelist.xml to be used in Emulationstation based on emuxtras Synopsis files.
# You will need to have your Roms, Movies, Artwork Xtras in a directory above this script
# convert_xtras.sh --
# |
# NES
# Master System
# SNES
# to run just pass the dirname of the Xtras you want to convert, the dirname should always be the first parameter
@shantigilbert
shantigilbert / package.mk
Last active February 15, 2018 01:38
Enable SSH by default on LE
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,