Skip to content

Instantly share code, notes, and snippets.

@sternenseemann
sternenseemann / uberspace-fb.diff
Last active December 24, 2015 19:59
Patch for Filebin to get it working on uberspace.de
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 7d701b7..16c6d75 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -316,7 +316,7 @@ class File extends MY_Controller {
echo '<div class="table-row">'."\n";
echo '<div class="table-cell">'."\n";
// TODO: use exec safe and catch exception
- $r = (new \libraries\ProcRunner(array(FCPATH.'scripts/Markdown.pl', $file)))->forbid_stderr()->exec();
+ $r = (new \libraries\ProcRunner(array('perl '.FCPATH.'scripts/Markdown.pl', $file)))->forbid_stderr()->exec();
@sternenseemann
sternenseemann / printer.sh
Last active December 16, 2015 23:59
adnprinter – Print posts of a adn-hashtag
#!/bin/bash
# Depencies: lp & wry
search='#adnprinter' # hashtag/search
count=7 # How many post should be printed?
cd /adnprinter #change that to cd /path/to/adnprinter
posts=$(wry search $search -c $count)
if test "$posts" != "$(cat ./ref.txt)"
then echo "$posts" > ./ref.txt
lp ./ref.txt