Skip to content

Instantly share code, notes, and snippets.

@nh2
nh2 / filterSourceConvenience.nix
Created March 6, 2019 18:56
A convenient function for filtering nix src input
# Example usage:
#
# src = filterSourceConvenience.filter ./. {
# srcDirs = [
# ./src
# ./app
# ./images
# ];
# srcFiles = [
# ./mypackage.cabal
{ config, lib, pkgs, ...}:
with lib;
{
nix.package = pkgs.nixUnstable;
nix.trustedUsers = [ "hydra" ];
nix.binaryCaches = [ "http://cache.example.org" "https://cache.nixos.org" ];
nix.buildMachines = [
@saurabhnanda
saurabhnanda / haskell-interhsip.md
Last active November 18, 2018 15:42
Haskell Internship Bounty Program

Attention

This page has been moved to http://www.vacationlabs.com/haskell-bounty-program

Haskell Internship Bounty Program

Here's the general idea:

  • Solve a pre-defined problem (could be an open source contribution OR an internal tool) for a bounty (basically success-fee). Not looking at GSoC level funding or problems, but something that can be done in 1-2 weeks with a 50-250$ bounty.
  • Supported by mentoring and general help over slack/IRC.
@bennofs
bennofs / default.nix
Last active August 7, 2017 19:50
Nix self/super override challenges. Solutions: https://gist.github.com/bennofs/65af82328bbd0c0e5db19d2a99070cc7
let
# Imports
nixpkgs = import <nixpkgs> {};
inherit (nixpkgs) lib;
inherit (lib) mapAttrs fix extends;
# Helpers
makeExtendable = base:
fix base // {
extend = f: makeExtendable (extends f base);
packageOverrides = super: {
xorg = super.xorg // rec {
xkeyboard_config_dvp = super.pkgs.lib.overrideDerivation super.xorg.xkeyboardconfig (old: {
patches = [
(builtins.toFile "ru-dvp.patch" ''
--- xkeyboard-config-2.16-orig/symbols/ru 2014-12-11 01:56:38.000000000 +0300
+++ xkeyboard-config-2.16/symbols/ru 2016-04-15 14:27:25.075214654 +0300
@@ -719,3 +719,24 @@
key <TLDE> { [ bracketright, bracketleft ] };
key <BKSL> { [ Cyrillic_io, Cyrillic_IO ] };
Authors

Merijn Verstraaten

Date

2014/11/22

So You Want to Be a Super Cool GHC Hacker?

So you have a pet peeve/bug/feature request that you'd like to see added to GHC. You made sure there was a Trac ticket for it, but despite your patient waiting no one is solving your problem. Those selfish GHC hackers!

TODO list for Snap 1.0

  • add remaining repositories to buildbot
  • cleanup/refactor command-line config stuff
  • kill warnings
  • release io-streams-haproxy
    • one more cleanup TODO re: passing in SockAddrs
  • cleanup docs
    • io-streams-style tutorial material and usage examples for most of the api
  • clean up the tutorial material on the website (second priority to the api docstrings)

TMUX - Single window group, multiple session.

So I have been using tmux for a while and have grown to like it and have since added many many customizations to it. Now once you start getting the hang of it, you'll naturally want to do more with the tool.

Now tmux has a concept of window-group and session and if you are like me you'll want multiple session that connects to the same window group instead of a new window group every time. Basically I just need different views into the same set of windows that I have already created, I don't want to create a new set of windows every time I fire up my terminal.

This is the default case if you simply use the tmux command as your login shell, effectively creating a new group of windows every time you start tmux.

This is less than ideal because, if you are like me, you fire up one-off terminals all the time and you don't want all those one-off jobs to stay running in the background. Plus sometimes you need information fro