Skip to content

Instantly share code, notes, and snippets.

View colonelpanic8's full-sized avatar

Ivan Malison colonelpanic8

View GitHub Profile

Nix Flake MVP

Goals

  • To provide Nix repositories with an easy and standard way to reference other Nix repositories.

  • To allow such references to be queried and updated automatically.

  • To provide a replacement for nix-channel, NIX_PATH and Hydra

#!/usr/bin/env runhaskell
import qualified Data.Map as M
import Test.QuickCheck
fibs :: [Int]
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
primes = sieve [2..] M.empty
where
sieve [] iterators = []
@mdiluz
mdiluz / fix_screen_tear.pl
Created May 13, 2016 10:58
Quickly set ForceFullCompositionPipeline with nvidia-settings for all currently connected screens, useful for gamers seeing screen tear issues
#!/usr/bin/perl
# Quickly set ForceFullCompositionPipeline with nvidia-settings for all currently connected screens, useful for gamers seeing screen tear issues
use strict;
use warnings;
# Grab xrandr output for parsing
my $xrandrOutput = `xrandr`;
# Filter all currently selected modes
my @modes = $xrandrOutput =~ /.*\sconnected.*/g;
@bitops
bitops / hipchat.el
Last active November 14, 2019 20:09
HipChat + jabber.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; use jabber-connect to connect. Make sure you tab to select the hipchat account if it's the ;;
;; only connection configured. ;;
;; ;;
;; a fork of https://gist.github.com/puffnfresh/4002033 ;;
;; ;;
;; shout out to http://emacs.stackexchange.com/questions/10940/connecting-to-hipchat-xmpp-via-jabber-el ;;
;; for the help. ;;
;; ;;
;; you can look up the necessary jabber info on the account i
@toroidal-code
toroidal-code / Hyper.md
Last active December 31, 2023 19:32
Have you a Hyper for Great Good

Have you Hyper for Great Good

So. You have become an Emacs wizard. And you find yourself aching for the simplicity that another modifier key would introduce into your life. Ah, the things you could do with Hyper.

Or maybe, you just want Hyper for another reason.

... Except everywhere you look, everyone's talking about .xmodmaps and xkbcomp, but you're using one of those fancy desktop managers. (Aka, not awesome, dwm, xmonad or something even more hipster) And because of that, you're lost in the sea of confusion that is trying to customize your keyboard mapping.

Gnome, Cinnamon, and KDE all use xkb.

@domenic
domenic / 0-github-actions.md
Last active April 8, 2024 23:35
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
anonymous
anonymous / molokai_init.el
Created January 12, 2015 22:49
(setq server-use-tcp t)
(package-initialize)
(load-theme 'molokai t)
anonymous
anonymous / alternate_init.el
Created January 2, 2015 14:31
(package-initialize)
(defun set-my-font-for-frame (frame)
(interactive (list nil))
(set-frame-font "Monaco for Powerline-12" nil t))
;; ;; This is needed because you can't set the font at daemon start-up.
(add-hook 'after-make-frame-functions 'set-my-font-for-frame)
(add-hook 'after-make-frame-functions (lambda (frame) (load-theme 'solarized-dark t)))
@wvengen
wvengen / extend.sh
Last active April 22, 2024 14:02
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`