Skip to content

Instantly share code, notes, and snippets.

View knocte's full-sized avatar
💭
F#ing

Andres G. Aragoneses knocte

💭
F#ing
View GitHub Profile
@knocte
knocte / gist:e923cca8dd7ea696e8905da3184ccf2d
Created October 2, 2016 06:48
Excerpt from the #mono channel... yet another reason to stop using shitty shell scripts and just embrace F# (.fsx) scripts
00:22 <JustArchi> Guys, I managed to find the culprit! :clap:
00:24 <JustArchi> @akoeplinger Normally ```/bin/sh``` is linked to ```dash``` on most systems, I had it linked to ```bash``` on my server. For some reason Mono builds properly when ```sh``` is linked to ```dash```, but not when it's linked to ```bash```. You can reproduce the bug by executing ```dpkg-reconfigure dash``` and choosing "no" (so ```sh``` is linked to ```bash```)
00:24 <hifi> `dash` is debianism
00:25 <JustArchi> Of course, I'm talking about Debian, not general Unix
00:25 <hifi> yeah, but it's bad if there's something in the build process explicitly depending on `dash`
00:26 <hifi> as that would make it fail on almost every non-debian based distribution
00:26 <JustArchi> Well, that's the case with BTLS then, for some reason. @akoeplinger let me know if you'd like to see that bug on bugzilla, or maybe you can let baulig know about it so he can look into that, as it seems he's responsible for btls integration.
00:27 <hifi> you would thin
@knocte
knocte / gist:c2d64f1692ad225e1ef42dcb70943825
Created May 19, 2016 02:30
mono bug with Enum.GetName() for a repeated item in an enum?
using System;
namespace TestConsole
{
public enum OpcodeType : byte
{
OP_0 = 0x00,
OP_TRUE = OP_1,
OP_1 = 0x51,
OP_2 = 0x52
@knocte
knocte / gist:5ac1130ce896a7e5f75aa634e2ca6f28
Last active April 17, 2016 02:54
Shopping Cart Code Kata
Implement the code for a supermarket checkout that calculates the total price of a number of items.
Goods are priced individually, however there are weekly special offers for when multiple items are bought.
For example “Apples are 50 each or 3 for 130”.
Weekly offers change frequently.
To simplify the kata, we'll do just two products:
+--------------+------------+-----------+
| Product name | Base Price | Offer |
@@ -1,9 +1,21 @@
#!/bin/sh
set -e
srcdir="$(dirname $0)"
cd "$srcdir"
-if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
- LIBTOOLIZE="${GLIBTOOLIZE}"
- export LIBTOOLIZE
+
+if [ -z ${LIBTOOLIZE} ]; then
@knocte
knocte / gist:57e00a0e81af74cc8382
Created October 12, 2015 22:26
buzzerbot compilation error
$ npm install
-
> configure@0.0.1 install /home/pi/Documents/Code/buzzerbot9000/node_modules/configure
> node install.js
-
> sqlite3@3.1.0 install /home/pi/Documents/Code/buzzerbot9000/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
dpkg-checkbuilddeps: Unmet build dependencies: autoconf automake pkg-config cli-common-dev (>= 0.5.7) libglib3.0-cil-dev (>= 2.99.2) gtk-sharp3-gapi (>= 2.99.2) libgstreamer1.0-dev libtool libtool-bin libgstreamer-plugins-base1.0-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
dpkg-buildpackage: warning: this is currently a non-fatal warning with -S, but will probably become fatal in the future
fakeroot debian/rules clean
dh clean --with cli
dh: unable to load addon cli: Can't locate Debian/Debhelper/Sequence/cli.pm in @INC (you may need to install the Debian::Debhelper::Sequence::cli module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at (eval 3) line 2.
BEGIN failed--compilation aborted at (eval 3) line 2.
debian/rules:25: rec
$ dpkg -I libgstreamer1.0-cil-dev_0.99.0-1_all.deb
new debian package, version 2.0.
size 2660 bytes: control archive=796 bytes.
943 bytes, 20 lines control
174 bytes, 2 lines md5sums
Package: libgstreamer1.0-cil-dev
Source: gstreamer-sharp-1
Version: 0.99.0-1
Architecture: all
Maintainer: Debian CLI Libraries Team <pkg-cli-libs-team@lists.alioth.debian.org>
15:29 <knocte> hyperair: ping
15:31 <hyperair> pong
15:38 -!- hyperair [~hyperair@000165f0.user.oftc.net] has quit [Remote host closed the connection]
15:38 -!- hyperair [~hyperair@000165f0.user.oftc.net] has joined #debian-cli
15:40 <knocte> hyperair: hey
15:41 <knocte> hyperair: I'm guessing you didn't package banshee 2.9.1 yet right?
15:41 <Laney> it's in experimental
15:42 <knocte> Laney: oh I see
15:43 * knocte looks at the debian/rules file
15:43 <Laney> knocte: https://tracker.debian.org/pkg/banshee useful link
Building with cowbuilder for distribution sid
I: using cowbuilder as pbuilder
dpkg-checkbuilddeps: Unmet build dependencies: autoconf automake pkg-config cli-common-dev (>= 0.5.7) libglib3.0-cil-dev (>= 2.99.2) gtk-sharp3-gapi (>= 2.99.2) libgstreamer1.0-dev libtool libtool-bin
W: Unmet build-dependency in source
dpkg-buildpackage: source package gstreamer-sharp-1
dpkg-buildpackage: source version 0.99.0-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Andres G. Aragoneses <knocte@gmail.com>
dpkg-source --before-build gstreamer-sharp-1
dpkg-source: info: using options from gstreamer-sharp-1/debian/source/local-options: --unapply-patches
Building with cowbuilder for distribution sid
I: using cowbuilder as pbuilder
dpkg-checkbuilddeps: Unmet build dependencies: autoconf automake pkg-config cli-common-dev (>= 0.5.7) libglib3.0-cil-dev (>= 2.99.2) gtk-sharp3-gapi (>= 2.99.2) libgstreamer1.0-dev autotools-dev
W: Unmet build-dependency in source
dpkg-buildpackage: source package gstreamer-sharp-1
dpkg-buildpackage: source version 0.99.0-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Andres G. Aragoneses <knocte@gmail.com>
dpkg-source --before-build gstreamer-sharp-1
dpkg-source: info: using options from gstreamer-sharp-1/debian/source/local-options: --unapply-patches