Skip to content

Instantly share code, notes, and snippets.

View Pitometsu's full-sized avatar
🐫
∀:camel:.P(:camel:) → ∅ ≡ (∃:camel:.P(:camel:)) → ∅

Yuriy Pitomets Pitometsu

🐫
∀:camel:.P(:camel:) → ∅ ≡ (∃:camel:.P(:camel:)) → ∅
View GitHub Profile
hackbook# nixos-rebuild switch --upgrade
downloading Nix expressions from ‘https://nixos.org/releases/nixos/unstable/nixos-16.03pre68239.bd84eba//nixexprs.tar.xz’...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
unpacking channels...
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/2nk1bwq7i63p1qg1pyzkgbyj8i6ff2zl-haskell-token-utils-0.0.0.6.drv
@Pitometsu
Pitometsu / configuration.nix
Last active July 11, 2023 18:58
NixOS system config
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
rec {
imports =
Preprocessing executable 'hobbes' for hobbes-0.2.2...
[1 of 1] Compiling Main ( Hobbes.hs, dist/build/hobbes/hobbes-tmp/Main.dyn_o )
Hobbes.hs:37:21:
Couldn't match type ‘system-filepath-0.4.13.4:Filesystem.Path.Internal.FilePath’
with ‘[Char]’
Expected type: FilePath
Actual type: system-filepath-0.4.13.4:Filesystem.Path.Internal.FilePath
In the second argument of ‘watchTree’, namely
‘(fromText $ pack dir)’
@Pitometsu
Pitometsu / search_and_replace.sh
Created October 30, 2015 00:08 — forked from kates/search_and_replace.sh
bulk search and replace with the silver searcher, awk, sed and xargs
ag "sometext" --nogroup | awk '{print substr($1,1,index($1,":")-1);}' | xargs -I {} sed -i .bak -e 's/sometext/anothertext/g' {}
@Pitometsu
Pitometsu / inconsolata-lgc.nix
Created November 5, 2015 18:50
inconsolata-lgc.nix
(let inconsolata-lgc = let version = "1.2.0";
in with pkgs; stdenv.mkDerivation rec {
name = "inconsolata-lgc-${version}";
src = fetchurl {
url = "https://github.com/MihailJP/Inconsolata-LGC/releases/download/LGC-1.2.0/InconsolataLGC-OT-1.2.0.tar.xz";
sha256 = "0rw8i481sdqi0pspbvyd2f86k0vlrb6mbi94jmsl1kms18c18p66";
};
dontBuild = true;
installPhase = let
fonts_dir = "$out/share/fonts/opentype";
@Pitometsu
Pitometsu / ghci.conf
Last active November 6, 2015 21:50
Fancy GHCi dotfile.
-- Make the prompt a little more colorful.
-- Full prompt
-- :set prompt "\001\ESC[01;35m\002%s \001\ESC[01;34m\002> \001\ESC[m\002\STX"
-- :set prompt2 "\001\ESC[01;35m\002%s \001\ESC[01;31m\002| \001\ESC[m\002\STX"
-- Neat prompt
:set prompt "\001\ESC[33m\002λ \001\ESC[01;34m\002> \001\ESC[m\002\STX"
:set prompt2 "\001\ESC[33m\002λ \001\ESC[01;31m\002| \001\ESC[m\002\STX"
@Pitometsu
Pitometsu / config.plist
Created April 2, 2016 17:15
Clover config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Boot</key>
<dict>
<key>DefaultVolume</key>
<string>5d537d48-49e0-974d-bd2b-a6dd5664b053</string>
<key>Log</key>
<true/>
-> % .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/admerge/admerge
admerge:
Initializer threw an exception...
libpq: failed (could not translate host name "db" to address: Name or service not known
)
...but before it died it generated the following output:
Initializing App @ /
Initializing heist @ /heist
...loaded 12 templates from /home/netsu/Projects/Kelecorix/admerge/snaplets/heist/templates
@Pitometsu
Pitometsu / config.h
Created May 23, 2016 23:01
st (simple terminal) config with solarized color scheme
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char font[] = "pragmatapro:pixelsize=16:weight=medium:antialias=true:autohint=true";
static int borderpx = 2;
Hours of hacking await!
If I break, you can:
1. Restart: M-x haskell-process-restart
2. Configure logging: C-h v haskell-process-log (useful for debugging)
3. General config: M-x customize-mode
4. Hide these tips: C-h v haskell-process-show-debug-tips
.stack-work/downloaded/04d9168fbbd059402af331b5a5c6a53a14b04f4757d3948ba67c183ae125630d/src/Servant/Server/Internal.hs:11:14: Warning: …
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
.stack-work/downloaded/04d9168fbbd059402af331b5a5c6a53a14b04f4757d3948ba67c183ae125630d/src/Servant/Server/Internal.hs:11:14: Warning: …
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS