Skip to content

Instantly share code, notes, and snippets.

View eazyliving's full-sized avatar

Christian Bednarek eazyliving

View GitHub Profile
@eazyliving
eazyliving / servermodes_0.20.tcl
Created May 26, 2021 20:47
21 year old tkirc script to prevent takeover via netsplit on irc...
################################################
# teh - op 0.2
# Christian Bednarek 01.09.2000 (00:40)
# -----------------------------
# Diese tkirc-extension versucht (;-), bei netjoins von Servern
# gesetzte Modes aufzuheben.
#
# Befehle:
# /ton - script einschalten
# /toff - script ausschalten
@eazyliving
eazyliving / nullnummern.tcl
Created January 22, 2019 17:44
autocurate nullnummern
source json.tcl
# find json.tcl here: https://github.com/dbohdan/jimhttp/blob/master/json.tcl
set curl "curl -s"
set curation_id <THE_CURATIONS_ID>
set accesstoken <AN_ACCESSTOKEN_YOU_GET_FROM_YOUR_DEV_PAGE>
# get the 10 podcast added the last
set latest [::json::parse [eval exec $curl "https://api.fyyd.de/0.2/podcast/latest?count=10"] 1]
@eazyliving
eazyliving / gist:270fd66e651f6e02c0d2b829cbad20f7
Created July 6, 2018 22:49
f3 pagination template for uikit
<!-- This is just fun and to try, if I can make this inside a template
Well... obviously f3 can :)
the original code is taken from uikit's pagination javascript (v2! http://getuikit.com/v2)
Don't take this for good practice, it is not!
It won't go into production for fyyd.de in this form :)
-->
<set pageurl="{{ substr ( @_SERVER.REQUEST_URI, 0, strrpos(@_SERVER.REQUEST_URI,'/')) }}"/>
<set edges="3"/>
<set pages="5"/>
curl -s "https://api.fyyd.de/0.2/podcast/episodes?podcast_id=45356&count=1" |
egrep -o 'fyyd.de\\/episode\\/[0-9]+' |
awk -F '/' '{print $NF}' |
xargs -n1 -I % curl -H 'Authorization: Bearer TOKEN-HIER-EINFUEGEN' "https://api.fyyd.de/0.2/curate" --data "curation_id=<ID-HIER>&episode_id=%"
@eazyliving
eazyliving / gist:ce89dafb033379987b3ec0503a65efac
Created May 17, 2016 18:42
bookmarklet snippet for fyydify
javascript:location.href='https://fyyd.de/fyydify-bm/'+btoa(location.href)
@eazyliving
eazyliving / PSB im alten firtz (Teil 2)
Created September 9, 2015 09:52
Diesen Snippet im alten site.html im Menü unterbringen
Diesen Snippet:
<li class="dropdown">
<a href="#" class="podlove-subscribe-button-{{@feedattr.slug}}">{{@dict_subscribe}}</a>
</li>
einsetzen, wo dieser (ab ca. Zeile 46) steht:
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
@eazyliving
eazyliving / PSB im alten firtz (Teil 1)
Created September 9, 2015 09:48
Diesen Snippet am Fuß der Seite nach allem Inhalt einfügen.
<!--podlove-sub-button-->
<script type="text/javascript">
window.podcastData = {
"title": {{json_encode(@feedattr.title) | raw}},
"subtitle": {{json_encode(@feedattr.description) | raw}},
"description": {{json_encode(@feedattr.summary) | raw}},
"cover": "{{@feedattr.image}}",
"feeds": [
<repeat group="@feedattr.audioformats" value="{{@format}}">
{
@eazyliving
eazyliving / change_baseurl.sh
Created August 25, 2015 22:52
Bash-Script zum tauschen der base-URL in auphonic description jsons. Im Grunde ein aufgeblasenes sed
printf "\033c\n";
printf "Dieses kleine bash-Script tauscht in den auphonic-Dateien des firtz (json) die Base-URL der Mediendateien.\n";
printf "Du benötigst das, wenn Du die Audiodateien auf einen anderen Server migrieren möchtest.\n";
printf "Wo vorher http://fasel.bla/audio1.mp3 der Ort der Datei war, ist er nun http://foo.bar/audio1.mp3.\n";
printf "Diese Script übernimmt die Arbeit, diese Änderungen in den Dateien vorzunehmen.\n\n";
printf "Wenn Du nun auf RETURN drückst, wird das Script diesen Ordner und die Unterordner nach Dateien durchsuchen,\n";
printf "die solche Base-URLs enthalten. Wähle bitte die zu ändernde aus. Los geht es! RETURN drücken!\n\n";
read
@eazyliving
eazyliving / cryptbug
Created July 22, 2014 21:09
crypt bug
<?php
$salt = "Salz in der Suppe";
$url1 = "http://g";
$url3 = "http://b";
$url2 = "http://gibtsnicht.eazy-living.de/?p=92";
echo "salt: $salt<br>";
echo $url1.": ".crypt($url1,$salt)."<br>";
@eazyliving
eazyliving / readTascamMarks.tcl
Last active August 29, 2015 14:02
read chapters from tascam wavs.
set fh [open $argv]
set bytes [read $fh]
set length 0
while {$length==0} {
binary scan $bytes a4 data
if {$data=="data"} {
binary scan [string range $bytes 4 8] i length
set bytes [string range $bytes [expr $length + 16] end]