Skip to content

Instantly share code, notes, and snippets.

{ stdenv, fetchFromGitHub, coreutils, ocamlPackages, zlib, pcre, neko, mbedtls
, ocaml-sha # put this into ocamlPackages
}:
stdenv.mkDerivation rec {
pname = "haxe";
version = "4.1.5";
src = fetchFromGitHub {
let
nixpkgs = import <nixpkgs> {};
pkgs = with nixpkgs; rec {
patched-ffmpeg = callPackage ./patched-ffmpeg.nix { };
jabref = callPackage ./jabref.nix { ffmpeg_2 = patched-ffmpeg; };
};
in pkgs
@tyrion
tyrion / pgauth.sql
Created June 30, 2019 10:55
DB level authentication with PostgreSQL
RESET SESSION AUTHORIZATION;
DROP OWNED BY webuser, login, user1;
DROP ROLE IF EXISTS webuser, login, user1;
CREATE ROLE login LOGIN NOINHERIT;
CREATE ROLE webuser NOINHERIT;
DROP SCHEMA IF EXISTS auth CASCADE;
CREATE SCHEMA auth;
SET search_path TO auth;
@tyrion
tyrion / poetry_bug.py
Last active May 20, 2019 14:40
Poetry Bug
def hello():
print("hello poetry")
@tyrion
tyrion / tiles.py
Last active February 18, 2018 09:38
Tile Coding Software
# tiles.py -- Tile Coding Software
# Copyright (C) <2018> <Germano Gabbianelli>
#
# Based on Tiles3 by Richard S. Sutton:
# http://incompleteideas.net/tiles/tiles3.html
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
INFO:trl.experiment: Initialized env <CarOnHill instance>
INFO:trl.experiment: observation space: Box(2,)
INFO:trl.experiment: action space: DiscreteValued(<built-in method tolist of numpy.ndarray object at 0x7faacc7818a0>)
INFO:trl.experiment: Random seeds (np, env): 2696744048250742569 None
INFO:trl.experiment: Discretized actions (2): [-4. 4.]
INFO:trl.experiment: Gamma: 0.950000
INFO:trl.experiment: Loading dataset from car.h5
INFO:trl.experiment: Collected 61443 samples
Using TensorFlow backend.
INFO:trl.regressor: Loaded regressor from car.h5
@tyrion
tyrion / twitter.py
Created June 17, 2015 12:36
Simple Interface to Twitter APIs
import json
import logging
import os
import traceback
from contextlib import closing
import requests
from requests_oauthlib import OAuth1
@tyrion
tyrion / smash.c
Last active November 2, 2015 21:51
#include <stdio.h>
void function(int a, int b, int c) {
char buffer1[8];
buffer1[12] += 7;
}
void main() {
int x = 0;
@tyrion
tyrion / bello.c
Created March 16, 2015 23:01
shambles MIPS
// dati smerdati input = smerdo
void sub4(int i, int smerdo) {
int *deadboob = 0xaddress;
bool v0 = 0;
i *= 4;
int t0 = deadboob[i];
int t2;

IRC

Disadvantages of IRC

  • It is only real-time. No support for offline messages or history of channels.

Current problems with our IRC server setup