Skip to content

Instantly share code, notes, and snippets.

(define-module (guix-local-packages zig)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages python)
#:use-module (gnu packages compression)
error: AccessDenied
Backtrace:
3 (primitive-load "/gnu/store/ngpyqpd3g3k1n31pdlqvp3rw99y?")
In ice-9/eval.scm:
191:35 2 (_ #f)
619:8 1 (_ #(#(#(#(#(#(#(#<directory (guil?> ?) ?) ?) ?) ?) ?) ?))
In guix/build/utils.scm:
654:6 0 (invoke _ . _)
guix/build/utils.scm:654:6: In procedure invoke:
function! SpawnBufferWindow(name)
let dummy_buf = bufnr(a:name, v:true)
call setbufvar(dummy_buf, '&buftype', 'nofile')
call setbufvar(dummy_buf, '&bufhidden', 'hide')
call setbufvar(dummy_buf, '&swapfile', 0)
call setbufvar(dummy_buf, '&buflisted', 1)
execute 'belowright vertical split #' . dummy_buf
endfunction
@l04m33
l04m33 / client.vim
Created February 6, 2017 10:39
Reproducing Vim channel_fill(...) issue
if exists('g:dummy_chan')
silent! call ch_close(g:dummy_chan)
endif
function! DummyCB(chan, msg)
echom '>>>> msg: ' . string(a:msg)
endfunction
let g:dummy_chan = ch_open('127.0.0.1:9999',
\ {'mode': 'json',
local GPG_AGENT_BIN=/usr/bin/gpg-agent
local GPG_AGENT_ENV="$HOME/.gnupg/gpg-agent.env"
local GPG_CONNECT_AGENT_ERR_MSG="gpg-connect-agent: no gpg-agent running in this session"
function start_agent_withssh {
${GPG_AGENT_BIN} --quiet --enable-ssh-support --daemon 2> /dev/null > "${GPG_AGENT_ENV}"
chmod 600 "${GPG_AGENT_ENV}"
@l04m33
l04m33 / clarifai.sh
Created May 16, 2016 02:45
Script to tag an image using Clarifai
#!/bin/sh
export CLIENT_ID="client-id" \
CLIENT_SECRET="client-secret" \
TOKEN_FILE="$HOME/.clarifai_token"
export TOKEN_API="https://api.clarifai.com/v1/token" \
TAG_API="https://api.clarifai.com/v1/tag"
var dc = new DataCollection();
dc.add("ID", "45115");
Server.sendRequest("SupportOppose.voteOppose", dc, function(res) { console.log(res); });
import asyncdispatch, math
randomize()
proc r1() {.async.} =
echo("r1 going to sleep....")
await sleepAsync(random(1000) + 500)
if true:
raise newException(ValueError, "Oops!")
echo("r1 is awake.")
@l04m33
l04m33 / ssummary.py
Created October 27, 2014 02:27
Smarter summary plugin for Pelican
import logging
from pelican import signals
from pelican import contents
logger = logging.getLogger(__name__)
def initialized(pelican):
from pelican.settings import DEFAULT_CONFIG
@l04m33
l04m33 / async_file_wrapper.py
Last active April 10, 2017 14:45
Async file wrapper for asyncio
class AsyncFileWrapper(object):
DEFAULT_BLOCK_SIZE = 8192
def __init__(self, loop=None, filename=None,
fileobj=None, mode='rb'):
if (filename is None and fileobj is None) or \
(filename is not None and fileobj is not None):
raise RuntimeError('Confilicting arguments')
if filename is not None: