Skip to content

Instantly share code, notes, and snippets.

View pasunboneleve's full-sized avatar
👨‍💻
Looking for work

Daniel Vianna pasunboneleve

👨‍💻
Looking for work
  • Melbourne, Australia
  • 09:01 (UTC +11:00)
View GitHub Profile
Prelude> :set -XDerivingStrategies
Prelude> :set -XGeneralizedNewtypeDeriving
Prelude> newtype Foo = Foo Int deriving newtype Show
Prelude> Foo 3
3
Prelude> newtype BFoo = BFoo Int deriving Show
Prelude> BFoo 3
BFoo 3
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.services.batteryNotifier;
in {
options = {
services.batteryNotifier = {
enable = mkOption {
@jackrusher
jackrusher / gcloud-tramp.el
Created June 19, 2019 13:58
Tramping into GCloud instances from within emacs
;; make sure you've set your default project with:
;; gcloud config set project <project-name>
(require 'tramp)
(add-to-list 'tramp-methods
'("gcssh"
(tramp-login-program "gcloud compute ssh")
(tramp-login-args (("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
@Dreameh
Dreameh / emacs.org
Created October 2, 2019 19:37
Installing emacs on fedora

Install Emacs on Fedora

As a Fedora user, I sometimes have to withstand the urge to get the latest version of something, simply because it doesn’t exist in the main repositories, nor in copr or anything, so I set out to fix that little urge by installing the source directly onto the system.

# Dependencies for development
sudo dnf group install "Development Tools"
# Dependencies specific to emacs
@gengwg
gengwg / github_private_email.md
Created October 10, 2019 03:44
remote: error: GH007: Your push would publish a private email address.
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 681 bytes | 681.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
@mschwaig
mschwaig / sway.nix
Last active May 4, 2025 08:47
Configure sway as the window manager for NixOS with gdm as the display manager
{ config, pkgs, lib, ... }:
{
# This sway config is mostly based on https://nixos.wiki/wiki/Sway
# which integrates sway with systemd in the style described here
# https://github.com/swaywm/sway/wiki/Systemd-integration
# and the replies in https://github.com/NixOS/nixpkgs/issues/57602
# with some individual packages added/removed and using sddm as the display manager.
#
# Take care to start the correct target as described by the sway proejct wiki.
import * as E from '@fp-ts/data/Either';
import * as Z from '@effect/io/Effect';
import * as Context from '@fp-ts/data/Context';
import { pipe } from '@fp-ts/data/Function';
import {
DataFunctionArgs as DataFunctionArgs_,
// LoaderFunction,
// TypedResponse,
// AppLoadContext,
json,