Skip to content

Instantly share code, notes, and snippets.

Väinö Järvelä Kaali

  • Finland
Block or report user

Report or block Kaali

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:3c2faddbfdacbf232e4d47c6ae33b6dd
these derivations will be built:
these paths will be fetched (17.91 MiB download, 98.96 MiB unpacked):
View diff.patch
diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix
index 87f3c78a82e..7b02b55be9a 100644
--- a/pkgs/development/libraries/glib-networking/default.nix
+++ b/pkgs/development/libraries/glib-networking/default.nix
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
configureFlags = "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt";
+ NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
Kaali / gist:0b9e8fecd5a35989e9ae968d059ffa96
Created Feb 22, 2018
nix error when building gst-plugins-bad-1.12.3
View gist:0b9e8fecd5a35989e9ae968d059ffa96
Making all in cocoa
make[5]: Entering directory '/private/tmp/nix-build-gst-plugins-bad-1.12.3.drv-0/gst-plugins-bad-1.12.3/gst-libs/gst/gl/cocoa'
OBJC libgstgl_cocoa_la-gstglwindow_cocoa.lo
In file included from gstglwindow_cocoa.m:26:
In file included from /nix/store/hkdkzqcvvsjghlh2z3mfnz11zkl3ybr8-apple-framework-Cocoa/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /nix/store/m803qhzlg26pqvcxmhhjks1dj6a3hx0d-apple-framework-Foundation/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /nix/store/m803qhzlg26pqvcxmhhjks1dj6a3hx0d-apple-framework-Foundation/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
In file included from /nix/store/m803qhzlg26pqvcxmhhjks1dj6a3hx0d-apple-framework-Foundation/Library/Frameworks/Foundation.framework/Headers/NSObject.h:8:
/nix/store/m803qhzlg26pqvcxmhhjks1dj6a3hx0d-apple-framework-Foundation/Library/Frameworks/Foundation.framework/Headers/NSZone.h:37:25: warning: '__strong' only applies to
if [[ "$EUID" -ne 0 ]]; then
echo "Please run as root"
exit 1
View gist:febdfd7670b681d21097
typedef unsigned char TYPE;
struct Foo {
TYPE p, a, i, r, s;
Foo() {}
Foo(TYPE p, TYPE a, TYPE i, TYPE r, TYPE s) : p(p), a(a), i(i), r(r), s(s) {}
Foo operator+(Foo const& x) {
return Foo(p + x.p, a + x.a, i + x.i, r + x.r, s + x.s);
Kaali / rakkauden.cpp
Created Nov 19, 2014
rakkauden kalkulaattori
View rakkauden.cpp
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <cassert>
#include <fstream>
#include <iostream>

Keybase proof

I hereby claim:

  • I am kaali on github.
  • I am kaali ( on keybase.
  • I have a public key whose fingerprint is 4E71 BABE 7100 707E EDAB 3F1F B2CA 1101 9AA0 DEEA

To claim this, I am signing this object:

open Core.Std
module Forest = struct
type t = {
goats: int;
wolves: int;
lions: int;
let create ~goats ~wolves ~lions = { goats; wolves; lions }
View forms.clj
(defn validator [param forms]
(remove nil?
(map (fn [[f s]] (when-not (f param) s)) forms)))
(defn- validator-wrapper [forms]
`(fn [param#] (validator param# ~forms)))
(defn form* [forms]
(apply merge
(map (fn [[k v]] {k (validator-wrapper v)}) (apply array-map forms))))
View gist:52718
# Django
# Calling MyModel.create() raises CustomError even if the caller catches it
# Built-in exceptions works fine, which can be tested easily with:
# CustomError = Exception
from django.db import models
class CustomError(Exception):
You can’t perform that action at this time.