#!/usr/bin/env boot | |
; vim: set ft=clojure: | |
(set-env! :dependencies | |
'[[com.itextpdf/forms "7.0.2"]]) | |
(import | |
'[com.itextpdf.forms PdfAcroForm] | |
'[com.itextpdf.kernel.pdf PdfDocument PdfReader PdfWriter] | |
'[java.io IOException]) |
Want to use Nix for development but you're not sure how? Concerned about the
fluidity of nixpkgs
channels or not being able to easily install arbitrary
package versions?
When I first heard about Nix it seemed like the perfect tool for a developer. When I tried to actually use it for developing and deploying web apps, though, the pieces just didn't seem to add up.
When developing a program in Ruby, you may sometimes encounter a memory leak. For a while now, Ruby has a facility to gather information about what objects are laying around: ObjectSpace.
There are several approaches one can take to debug a leak. This discusses a time-based approach, where a full memory dump is generated every, say, 5 minutes, during a time that the memory leak is showing up. Afterwards, one can look at all the objects, and find out which ones are staying around, causing the
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
(require-extension ansi-escape-sequences srfi-19 srfi-1 srfi-13 posix) | |
(define (reload-config) (load "~/.hiss")) | |
(define-syntax install (syntax-rules () ((sudo arg1 ...) (_raw sudo apt-get install arg1 ...)))) | |
(define-syntax ! (syntax-rules () ((! arg1 ...) (_raw arg1 ...)))) | |
(define-syntax apt-search (syntax-rules () ((apt-search arg1 ...) (_raw aptitude search arg1 ...)))) | |
(define ++ string-append) |
[user] | |
name = Tsutomu Kuroda | |
email = t-kuroda@oiax.jp | |
[alias] | |
ci = commit | |
cia = commit --amend | |
co = checkout | |
cop = checkout @{-1} | |
cp = cherry-pick | |
mf = merge --ff-only |
/* use this one. github is not cooperating. */ | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Text.RegularExpressions; | |
/* god my c# is so messy. | |
* I'm not fond of proper C#. I rather like C, really | |
*/ |
# Prompts | |
# 30 31 32 33 34 35 36 37 | |
# BK RE GR YE BL MA CY WH | |
if [ $UID = "0" ]; then | |
PROMPT="%{[01;31m%}%n@%m%#%{[m%} " | |
else | |
PROMPT="%{[01;36m%}%n@%m%#%{[m%} " | |
fi | |
RPROMPT="%{[36m%}[%~]%{[m%}" |
use must for positive expectations and wont for negative expectations.
- must_be | list.size.must_be :==, 0
- must_be_close_to | subject.size.must_be_close_to 1,1
- must_be_empty | list.must_be_empty
- must_be_instance_of | list.must_be_instance_of Array
- must_be_kind_of | list.must_be_kind_of Enumerable