Skip to content

Instantly share code, notes, and snippets.

@remko
remko / CryptoPassCLI.cpp
Created January 15, 2012 15:25
Native, command-line version of CryptoPass using Swiften
/*
* Native, command-line version of CryptoPass ( http://tinyurl.com/cryptopass )
* using the Swiften library ( http://swift.im/swiften )
*
* Copyright (c) 2012 Remko Tronçon
* Licensed under the GNU General Public License v3
*/
#include <Swiften/Base/Platform.h>
#include <Swiften/StringCodecs/PBKDF2.h>
@remko
remko / gist:4131484
Created November 22, 2012 14:37
Connecting over BOSH with Swiften
#include <Swiften/Swiften.h>
using namespace Swift;
int main(int, char**) {
SimpleEventLoop eventLoop;
BoostNetworkFactories networkFactories(&eventLoop);
Client* client = new Client("me@server.lit", "mypassword", networkFactories); /* Substituting the JID and password accordingly. */
@remko
remko / gist:4131496
Created November 22, 2012 14:40
Swiften: Connect over BOSH
#include <Swiften/Swiften.h>
using namespace Swift;
int main(int, char**) {
SimpleEventLoop eventLoop;
BoostNetworkFactories networkFactories(&eventLoop);
Client* client = new Client("me@server.lit", "mypassword", networkFactories); /* Substituting the JID and password accordingly. */
@remko
remko / mergebst.hs
Created December 1, 2012 08:30
Merge Binary Search Trees
import Data.List
import Data.Array
data Tree a = Leaf | Node a (Tree a) (Tree a) deriving (Show, Eq)
-- Flatten a Binary Search Tree into a sorted list
flatten :: Tree a -> [a]
flatten Leaf = []
flatten (Node n l r) = (flatten l) ++ n : flatten r

Keybase proof

I hereby claim:

  • I am remko on github.
  • I am remko (https://keybase.io/remko) on keybase.
  • I have a public key whose fingerprint is E00B 5436 4600 75B9 05D1 C7BE F01E 29A2 3F4B 0D61

To claim this, I am signing this object:

diff -urN mutt-1.5.24/PATCHES mutt-1.5.24.new/PATCHES
--- mutt-1.5.24/PATCHES 2015-08-30 19:06:38.000000000 +0200
+++ mutt-1.5.24.new/PATCHES 2015-12-23 22:50:08.000000000 +0100
@@ -0,0 +1 @@
+patch-1.5.16hg.cd.trash_folder.vl.1
diff -urN mutt-1.5.24/commands.c mutt-1.5.24.new/commands.c
--- mutt-1.5.24/commands.c 2015-08-30 19:18:28.000000000 +0200
+++ mutt-1.5.24.new/commands.c 2015-12-23 22:50:08.000000000 +0100
@@ -720,6 +720,7 @@
if (option (OPTDELETEUNTAG))
@remko
remko / cue2ffmeta.rb
Last active April 21, 2022 13:48
Script to convert .cue files to FFMPEG metadata files
#!/usr/bin/env ruby
# Simple script to convert .cue files to FFMPEG Metadata files
# This can then be fed to ffmpeg to add chapters etc. to
# an MP4 or MKV file, e.g.
#
# ./cue2ffmeta.rb <FILE>.cue <TOTAL_LENGTH_IN_SECONDS> > metadata.txt
# ffmpeg -i <INPUT> -i metadata.txt -map_metadata 1 -codec copy <OUTPUT>
#
# (the TOTAL_LENGTH_IN_SECONDS is optional)
@remko
remko / to_metadata.rb
Last active December 28, 2017 10:17
Converts a list of files to FFmpeg's metadata format
#!/usr/bin/env ruby
require 'csv'
def parse_csv(s)
return CSV.parse(s)[0][0]
end
title = parse_csv(`ffprobe -i \"#{ARGV[0]}\" -show_entries format_tags=album -v quiet -of csv=\"p=0\"`)
artist = parse_csv(`ffprobe -i \"#{ARGV[0]}\" -show_entries format_tags=artist -v quiet -of csv=\"p=0\"`)
That is, that Father Chambers (?) & our lady of the abbey (?) could be brought together
and could better agree than they could until now
which (on the contrary | in the area) causes great unrest
the reason why, nobody knows, except themselves