Skip to content

Instantly share code, notes, and snippets.

@mjlbach
mjlbach / gccEmacs.md
Last active December 6, 2023 10:34
Installing gccEmacs (native-comp) with Nix

WARNING: THIS GIST IS OUT OF DATE AND NO LONGER RELEVANT

  • Native-comp was enabled by default in nixpgks
  • Pgtk is not enabled by default, for that you can either override the derivation or use emacsPgtk from the nix-community emacs overlay if you don't want to build it yourself

Nix

Adding the overlay and configuring cachix

@graninas
graninas / haskeller_competency_matrix.md
Last active June 27, 2025 16:13
Haskeller competency matrix
@adisbladis
adisbladis / env1-shell.nix
Created July 17, 2019 11:53
Merge multilple shell.nix files using mkShell
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.hello
];
shellHook = ''
echo env1
'';
@Zhuinden
Zhuinden / realm-lifecycle-per-screen.java
Created September 3, 2016 14:32
Realm instance lifecycle per Activity/Fragment
public class SomeActivity extends AppCompatActivity {
Realm realm;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
realm = Realm.getDefaultInstance();
}
@Override
@danriti
danriti / hipchat-v2.sh
Last active February 25, 2025 11:53
HipChat API v2 - Send a message to a room using cURL
#!/bin/bash
# Set the ROOM_ID & AUTH_TOKEN variables below.
# Further instructions at https://www.hipchat.com/docs/apiv2/auth
ROOM_ID=XXX
AUTH_TOKEN=XXX
MESSAGE="Hello world!"
curl -H "Content-Type: application/json" \
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active February 13, 2026 16:32
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname