Skip to content

Instantly share code, notes, and snippets.

View Neo-Oli's full-sized avatar
🐻
In Cyberspace

glow Neo-Oli

🐻
In Cyberspace
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>iframe-click2play</title>
<style>
.iframe-c2p-play {
width: 2em;
height: 2em;
border-radius: 50%;
position: relative;
#http://chriskempson.github.io/base16/#tomorrow
background=#1d1f21
foreground=#c5c8c6
cursor=#c5c8c6
color0=#1d1f21
color1=#cc6666
color2=#b5bd68
color3=#f0c674
color4=#81a2be
@Neo-Oli
Neo-Oli / pass.patch
Last active March 21, 2016 15:09
Pass patch to make it sort of work in termux. Apply it to /src/password-store.sh and install with `make install`
--- password-store-master/src/password-store.sh 2016-02-07 12:05:52.000000000 +0100
+++ /data/data/com.termux/files/usr/bin/pass 2016-03-07 21:29:27.667761280 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/data/data/com.termux/files/usr/bin/env bash
# Copyright (C) 2012 - 2014 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
@@ -12,7 +12,9 @@
which gpg2 &>/dev/null && GPG="gpg2"
### Keybase proof
I hereby claim:
* I am neo-oli on github.
* I am glow (https://keybase.io/glow) on keybase.
* I have a public key whose fingerprint is E65A 8520 F36A EE13 CFE4 F56B EB8F E331 063A 4794
To claim this, I am signing this object:
@Neo-Oli
Neo-Oli / lighttpd.conf
Created December 20, 2016 20:43
lighttpd -D -f ~/.lighttpd/lighttpd.con
server.document-root = "/data/data/com.termux/files/home/www"
server.upload-dirs = ("/data/data/com.termux/files/home/.lighttpd/upload")
server.port = 8080
#load modules
server.modules = (
"mod_redirect",
"mod_auth",
#"mod_cgi",
"mod_accesslog",
@Neo-Oli
Neo-Oli / mail_notify.py
Last active April 6, 2017 07:45
Mail notification script for termux
#!/data/data/com.termux/files/usr/bin/python3
import os
# from subprocess import Popen
import subprocess
import email
import re
from email.header import decode_header
import json
def run(command):
@Neo-Oli
Neo-Oli / .mailrules
Created April 6, 2017 07:52
getmail postprocessor to move emails to specific folders according to ruls
From:sony@email.sonyentertainmentnetwork.com=f:spam
From:rundschreiben@abload.de=f:spam
To:wettbewerb@oliverse.ch=f:spam
From:no-reply@jetpack.com=f:spam
From:no-reply@airdroidmail.com=f:spam
From:mtvmobile@newsletter.sunrise.ch=f:spam
From:news@quickline.com=f:spam
From:no-reply@mail.instagram.com=f:spam
From:pinbot@explore.pinterest.com=f:spam
From:news@siroop.ch=f:spam
#!/data/data/com.termux/files/usr/bin/bash
set -e
files=`find $HOME/mail/.outbox -type f`
if [ -n "$files" ];then
lockdir="$PREFIX/var/run/`basename $0`.lock"
if mkdir "$lockdir"
then
#echo >&2 "successfully acquired lock: $lockdir"
trap 'rm -rf "$lockdir"' 0
else
@Neo-Oli
Neo-Oli / backup.py
Last active April 6, 2017 08:47
email backup. Parts of my backup system
def mkdir(path):
if not os.path.isdir(path):
os.makedirs(path)
def ln(source,target):
target=target.replace(":","%%%%%")
# print("{} => {}".format(source,target))
if os.path.isfile(target):
os.remove(target)
os.symlink(source,target)
@Neo-Oli
Neo-Oli / restore.sh
Created April 6, 2017 08:53
email backup resore
#creating maildir
cd ~/drive/mail
mkdir ~/mail
#creating directories in maildir
for dir in `find -type d`;do
if [ "$dir" != "." ];then
mkdir "$HOME/mail/$dir"
fi
done
#copying mails, replacing the backup string with colon