Skip to content

Instantly share code, notes, and snippets.

@uGeek
uGeek / org2doku
Created December 17, 2017 14:28 — forked from takaxp/org2doku
Convert Emacs org-mode formatted text to Dokuwiki formatted one.
#!/opt/local/bin/perl
#
# Modified by @takaxp
# Last Update: 2014-04-11@22:27
# 2013-12-25: skip source blocks specified as ":exports no"
# 2012-01-09: support date([YYYY-MM-DD XX]) insertion
# 2012-01-09: support #+BEGIN_SRC
# 2011-11-16: use strict and warnings
# 2011-11-16: Add conversion from numeric items to ` - '.
# 2011-11-16: Skip headers, if #+TITLE: is, use it as the top headline.
@uGeek
uGeek / nfs_automount.sh
Created December 17, 2017 15:27 — forked from aldur/nfs_automount.sh
Mount an NFS share on Android
#!/bin/sh
# Mount an NFS share on Android
# Requirements:
# - Busybox
# - A kernel supporting nfs (either built-in or as a module)
# On my Nexus 7 2012 I use the following kernel:
# http://forum.xda-developers.com/showthread.php?t=2107224
# Remember: if you have problems of system space, simply delete some of the default stuff.
@uGeek
uGeek / install_docker.sh
Created May 5, 2018 19:09 — forked from angristan/install_docker.sh
Script to install Docker and Docker-Compose on Debian
#!/bin/bash
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common sudo
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"
apt-get update
@uGeek
uGeek / [email protected]
Created June 7, 2019 20:11 — forked from gmag11/[email protected]
Mount multiple RClone remotes on boot with a single SystemD forking service definition
# Rclone mount on boot
# Copy file to: /lib/systemd/system
# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote>
# This example uses /cloud/ folder as origin to mount all remotes, change it to your needs
# This example use a linux user named rclone. Create it or adapt it to your needs. Rclone will get config from that user's home folder
# Register new service by typing:
# sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# sudo systemctl enable rclone-mount@<rclone-remote>.service
# systemctl start rclone-mount@<rclone-remote>.service
@uGeek
uGeek / INSTALL.md
Created July 13, 2019 19:54
A simple script to control the temperature of our raspberry pi. This script save the temperature in a log file and if it's greater than 70 ºC, our raspberry will be shutdown for security

INSTALL

The installation is very easy. First, you need to download the file below: checkTemp.sh. To complet this task, open a terminal an execute this command:

wget https://gist.github.com/Angelmmiguel/e13fed981e91bf6a298c/raw/0c33849753f17bd3b70d3aa2a4cfc06e05abafb3/checktemp.sh

The second step is to copy this file to the Crontab folder (Crontab is an application to schedule scripts in Unix systems):

sudo cp checktemp.sh /etc/cron.d/

The last step is to initialize the crontab task. You must open the crontab file to save the task with this command:

@uGeek
uGeek / rtm2org.py
Created August 12, 2019 21:46 — forked from ngoffee/rtm2org.py
Convert Remember the Milk tasks feed to Emacs org-mode file
#!/usr/bin/env python
# rtm2org.py
#
# Convert Remember the Milk tasks feed to Emacs org-mode file
#
# requires Python >= 2.7 (for ElementTree.iter())
#
# Find your RTM Atom feed here:
# https://www.rememberthemilk.com/atom/<username>
@uGeek
uGeek / nv2org.sh
Created August 12, 2019 21:51 — forked from ngoffee/nv2org.sh
Convert a directory of Notational Velocity notes to a single Emacs org-mode file
#!/bin/sh
# Convert a directory of Notational Velocity notes to a single file of
# Emacs org-mode notes. Must be run from within the directory to be
# converted. Each entry in the resulting org file will be a 2nd-level
# entry ("** ...") whose title is derived from the filename and whose
# body contains the file contents. Output is written to stdout. '*' at
# the beginning of a line will be converted to '-' to avoid being
# confused with an org-mode headline.
@uGeek
uGeek / pyrss2gen-example.py
Last active October 8, 2019 19:27 — forked from martg0/pyrss2gen-example.py
PyRSS2Gen example
#"""
#example of the usage of pyrss2gen library.
#URL: http://www.dalkescientific.com/Python/PyRSS2Gen.html
# Install: pip3 install pyrss2gen
# Exec: python3 pyrss2gen.py
#"""
import datetime
import PyRSS2Gen
@uGeek
uGeek / play.sh
Created October 13, 2019 20:20 — forked from iltempe/play.sh
Suonare un allarme tramite i dati in emergenza
#!/bin/bash
#vedere doc http://python-rsstail.readthedocs.io/en/latest/
rsstail -i 3 -u http://emergency.copernicus.eu/mapping/list-of-components/EMSR261/feed -n 0 | while read line
do
afplay allarme.mp3
echo "$line"
done