Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastian Hübner imolein

View GitHub Profile
@imolein
imolein / drone_docker-compose.yaml
Created Dec 13, 2019
Drone docker-compose.yaml
View 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 Jun 19, 2019
Calculates the CIDR prefix from dot-decimal netmask
View mask_to_cidr.lua
-- 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 Apr 12, 2019
Bash prompt with git branch and dirty detection
View bash-prompt.sh
# 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 Feb 22, 2019
Test receiver for andoid gps logger
View gps-logger.lua
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 Jan 28, 2019
This script returns the domains and what percentage of your followers belong to them. Updated version at https://git.kokolor.es/imo/follower-stats
View follower-domain-stats.lua
#!/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 Sep 14, 2018
An ugly question server, written to learn how coroutines work
View question-server.lua
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 Jul 27, 2018
Rosetta Code/Find unimplemented tasks
View find-unimplemented-tasks.lua
-- 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')
@imolein
imolein / update_pleromafe.sh
Last active Nov 2, 2017
PleromaFE update script
View update_pleromafe.sh
#!/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"
View pleroma_install.md

!!! 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.

View keybase.md

Keybase proof

I hereby claim:

  • I am imolein on github.
  • I am imo (https://keybase.io/imo) on keybase.
  • I have a public key whose fingerprint is 911F B443 62AD 67DE 4713 4DC6 AFA1 0CBF E439 1C0C

To claim this, I am signing this object:

You can’t perform that action at this time.