Skip to content

Instantly share code, notes, and snippets.

@sualko
sualko / print-nextcloud-log.js
Created February 14, 2021 15:30
Print Nextcloud Log
const fs = require('fs');
let logFile = process.argv[2] || './data/nextcloud.log';
fs.readFile(logFile, 'utf8', function (err, data) {
if (err) throw err;
data.split('\n').forEach((line) => {
if (!line) return;
@sualko
sualko / mod_turncredentials.lua
Last active April 25, 2020 18:23
Prosody module for XEP-0215
-- This is basically copied from andyet [1], except that it adds the required
-- namespace and fixes a small tab/space issue. Compared to the official module [2]
-- this module allows to pass multiple TURN/STUN addresses.
-- [1] https://github.com/andyet/otalk-server/blob/50d5d385f8d81fd133c4f880ee8873b1273ee867/mod_turncredentials/mod_turncredentials.lua
-- [2] https://hg.prosody.im/prosody-modules/file/tip/mod_turncredentials/mod_turncredentials.lua
-- XEP-0215 implementation for time-limited turn credentials
-- Copyright (C) 2012-2013 Philipp Hancke
-- This file is MIT/X11 licensed.
@sualko
sualko / ultimate-ut-cheat-sheet.md
Last active June 20, 2017 13:40 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@sualko
sualko / FacebookController.php
Last active November 6, 2017 15:58
Typo3 Neos Plugin to retrieve and display last Facebook post from given fb-pageid.
<?php
// YOUR_PACKAGE/Classes/YOUR_NAMESPACE/Controller/FacebookController.php
namespace YOUR_NAMESPACE\Controller;
use TYPO3\Flow\Annotations as Flow;
class FacebookController extends \TYPO3\Flow\Mvc\Controller\ActionController {
/**

Keybase proof

I hereby claim:

  • I am sualko on github.
  • I am sualko (https://keybase.io/sualko) on keybase.
  • I have a public key whose fingerprint is A3C4 DF1D 626D F8E1 E982 E68E 20C7 433F 9AD1 4FD7

To claim this, I am signing this object: