Skip to content

Instantly share code, notes, and snippets.

@jagajaga
jagajaga / vim2nix.sh
Last active November 22, 2021 10:38
#!/usr/bin/env sh
# Simple script to create a buildVimPlugin drv for NixOs
# JagaJaga 2014
# Usage ./vim2nix.sh repoOwner/repoName (only github is supported)
# Deps: nix-prefetch-scripts
rep="https://github.com/"$1".git"
homepage="https://github.com/"$1
rev=$(git ls-remote "$rep" | head -1 | cut -f1)
name=$(echo "$1" | sed 's/\(.*\)\/\(.*\)/\2/g' | sed 's/vim-\(.*\)/\1/g' | sed 's/\(.*\)\.vim/\1/g')

Keybase proof

I hereby claim:

  • I am jagajaga on github.
  • I am jagajaga (https://keybase.io/jagajaga) on keybase.
  • I have a public key ASAgP5myez3eLNjgt4aZ-CLxsz_qppSOt5RNHSZ1K_YVuAo

To claim this, I am signing this object:

execve("/home/jaga/.nix-profile/bin/mplayer", ["mplayer", "Music/00 outkast-ms.jackson.mp3"], [/* 68 vars */]) = 0
brk(NULL) = 0x561ebc370000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f664fd6f000
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/run/opengl-driver/lib/tls/x86_64/libncursesw.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/tls/x86_64", 0x7fffcfd44800) = -1 ENOENT (No such file or directory)
open("/run/opengl-driver/lib/tls/libncursesw.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
open("/run/opengl-driver/lib/x86_64/libncursesw.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/x86_64", 0x7fffcfd44800) = -1 ENOENT (No such file or directory)
@jagajaga
jagajaga / openpgp.txt
Created May 5, 2016 06:47
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:497b07872077746add6ced82c4f131df7f7b40e3]
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.List
import Data.Text (Text)
import Data.Text.IO as IO
import Prelude hiding (drop, lenght, take)
import System.Random
type Tasks = [[ Text ]]
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UnboxedTuples #-}
import Prelude (Bool (..), Double, Float, Int,
#compdef hello
_hello() {
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments \
'1: :->action'\
'*: :->folder'
#compdef gshell
 
_gshell() {
    local curcontext="$curcontext" state line
    typeset -A opt_args
 
    _arguments \
        '1: :->action'\
        '*: :->folder'
#compdef hello
_hello() {
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments \
'1: :->action'\
'*: :->folders'
#compdef gshell
 
_gshell() {
    local curcontext="$curcontext" state line
    typeset -A opt_args
 
    _arguments \
        '1: :->action'\
        '*: :->folder'