This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#{ stdenv, fetchurl, python3Packages }: | |
with import <nixpkgs> {}; | |
python3Packages.buildPythonApplication rec { | |
name = "foobar"; | |
version = "0.23.23.44"; | |
meta = { | |
description = "foobar tool"; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alech@air:~]$ stack ghci | |
Preparing to install GHC to an isolated location. | |
This will not interfere with any system-level installation. | |
Already downloaded. | |
Running /run/current-system/sw/bin/make install in directory /home/alech/.stack/programs/x86_64-linux/ghc-8.4.3.temp/ghc-8.4.3/ exited with ExitFailure 2 | |
/run/current-system/sw/bin/make --no-print-directory -f ghc.mk install BINDIST=YES NO_INCLUDE_DEPS=YES | |
"rm" -f utils/ghc-pkg/dist-install/build/Version.hs | |
echo "module Version where" >> utils/ghc-pkg/dist-install/build/Version.hs | |
echo "version, targetOS, targetARCH :: String" >> utils/ghc-pkg/dist-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine exposing (..) | |
import Combine.Char exposing (..) | |
import String | |
import Char | |
flattenStringList : List String -> String | |
flattenStringList = | |
List.foldr (++) "" | |
comment : Parser String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foobar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alech@zoe:~$ crontab -l|grep backup_sessionstore | |
*/5 * * * * /home/alech/bin/backup_sessionstore.sh | |
alech@zoe:~$ cat bin/backup_sessionstore.sh | |
#!/bin/sh | |
cp /home/orange/.mozilla/firefox/7jyhhf5c.default/sessionstore.js /home/alech/tmp/backup_sessionstore/sessionstore.js | |
cd /home/alech/tmp/backup_sessionstore | |
git commit -a -m 'automatic backup' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PROGNAME=$1 | |
shift | |
$PROGNAME $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
a = `acpi` | |
if a[/Discharging/] then | |
# battery is discharging, check if we are below 3% | |
perc = a[/(\d+)%/, 1] | |
if perc.to_i <= 3 then | |
log = open '/tmp/debuglog', 'w' | |
log.puts "Battery discharging, percentage <= 3" | |
log.close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function WarningMessage(msg) | |
echohl WarningMsg | |
echo a:msg | |
echohl Nothing | |
endfunction | |
nnoremap <LEFT> :call WarningMessage("Use h!")<CR>h | |
nnoremap <DOWN> :call WarningMessage("Use j!")<CR>j | |
nnoremap <UP> :call WarningMessage("Use k!")<CR>k | |
nnoremap <RIGHT> :call WarningMessage("Use l!")<CR>l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function WarningMessage(msg) | |
echohl WarningMsg | |
echo a:msg | |
echohl Nothing | |
endfunction | |
nnoremap <LEFT> :call WarningMessage("Use h!")<CR>h | |
nnoremap <DOWN> :call WarningMessage("Use j!")<CR>j | |
nnoremap <UP> :call WarningMessage("Use k!")<CR>k | |
nnoremap <RIGHT> :call WarningMessage("Use l!")<CR>l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO | |
import System.Environment | |
import Data.Maybe | |
import System.Directory | |
main :: IO () | |
main = do | |
hSetBuffering stdout NoBuffering | |
args <- getArgs | |
let files = case args of |
NewerOlder