Skip to content

Instantly share code, notes, and snippets.

View imolein's full-sized avatar

Sebastian Hübner imolein

View GitHub Profile
@imolein
imolein / km_press_to_rss.lua
Created February 5, 2021 11:10
Generiert einen RSS feed aus den Pressemitteilungen des Landkreis Meissen
#!/usr/bin/env lua
-- Generiert einen RSS feed aus den Pressemitteilungen des Landkreis Meissen.
-- Schade das es keinen direkt auf der Seite gibt...
--
-- Abhängigkeiten:
-- * lua - https://lua.org
-- * luasocket - https://github.com/diegonehab/luasocket
-- * lua-htmlparser - https://github.com/msva/lua-htmlparser
-- * etlua - https://github.com/leafo/etlua
-- * date - https://github.com/Tieske/date
@imolein
imolein / drone_docker-compose.yaml
Created December 13, 2019 08:34
Drone docker-compose.yaml
version: '3'
services:
drone-server:
image: drone/drone:1
ports:
- 80:80
volumes:
- drone-server-data:/var/lib/drone/
@imolein
imolein / mask_to_cidr.lua
Last active June 19, 2019 12:24
Calculates the CIDR prefix from dot-decimal netmask
-- calculates binary equivalent of "n"
local function bin(n)
local binary = {}
n = tonumber(n)
local function _bin(_n)
if _n > 1 then _bin(_n // 2) end
table.insert(binary, _n % 2)
end
@imolein
imolein / bash-prompt.sh
Last active April 12, 2019 15:00
Bash prompt with git branch and dirty detection
# Add the lines to your .bashrc
# color definitions
r_red="\e[0;31m"
r_grn="\e[0;32m"
b_wht="\e[1;37m"
b_cyn="\e[1;36m"
b_red="\e[1;31m"
b_blu="\e[1;34m"
b_ylw="\e[1;33m"
@imolein
imolein / gps-logger.lua
Last active February 22, 2019 16:45
Test receiver for andoid gps logger
local pegasus = require('pegasus')
local server = pegasus:new({
port = '9999'
})
server:start(function(req, resp)
local method = req:method()
local path = req:path()
local query = req:params()
@imolein
imolein / follower-domain-stats.lua
Last active January 28, 2019 20:50
This script returns the domains and what percentage of your followers belong to them. Updated version at https://git.kokolor.es/imo/follower-stats
#!/usr/bin/env lua
-- This script returns the domains and what percentage of your followers belong to them.
-- Works with Pleroma and Mastodon
--
-- Usage:
-- lua follower-domain-stats.lua INSTANCE USER_ID [ACCESS_TOKEN]
--
-- Example:
-- lua follower-domain-stats.lua https://edolas.world 1 1234567abcdef
--
@imolein
imolein / question-server.lua
Last active September 14, 2018 18:02
An ugly question server, written to learn how coroutines work
local socket = require("socket")
local inspect = require('inspect')
local host = "127.0.0.1"
local port = 9090
if arg then
host = arg[1] or host
port = arg[2] or port
end
@imolein
imolein / find-unimplemented-tasks.lua
Last active July 27, 2018 17:37
Rosetta Code/Find unimplemented tasks
-- Dependencies: lua >=5.1, lua-requests (>=1.2-0)
-- Example Usage: lua find-unimplemented-tasks.lua "Python"
-- Output:
-- Python has 24 unimplemented programming tasks:
-- 15 puzzle solver
-- Bitmap/PPM conversion through a pipe
-- Bitmap/Read an image through a pipe
-- ...
local requests = require('requests')

!!! Outdated !!!

Please visit https://git.pleroma.social/pleroma/pleroma/wikis/home for up to date guides.

How to install PleromaBE

Pleroma is a lightwight OStatus implementation, written in Elixir by lain and others. It's currently in Beta status.

This guide was written during an installation on Ubuntu 16.04, but I think this should work for Debian too.

@imolein
imolein / update_pleromafe.sh
Last active November 2, 2017 18:55
PleromaFE update script
#!/bin/bash
# Make changes here BEGIN
# url where you can download the newest pipeline zip file
URL="https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/develop/download?job=build"
# folder where postActiv/GNUsocial is installed
DESTDIR="/var/www/postActiv"