Skip to content

Instantly share code, notes, and snippets.

View pauldub's full-sized avatar
🐱
🇫🇷 🇧🇪

Paul pauldub

🐱
🇫🇷 🇧🇪
View GitHub Profile
# Prompts
# 30 31 32 33 34 35 36 37
# BK RE GR YE BL MA CY WH
if [ $UID = "0" ]; then
PROMPT="%{%}%n@%m%#%{%} "
else
PROMPT="%{%}%n@%m%#%{%} "
fi
RPROMPT="%{%}[%~]%{%}"
(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)
@zardoru
zardoru / fixed_converter
Last active July 13, 2016 14:01
Stepmania converter to osu!mania in c#. fixed a few bugs.
/* 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
*/
[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
@voldmar
voldmar / fill.clj
Created March 27, 2017 13:39
Filling PDF AcroForm with Clojure and iText 7 community edition POF
#!/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])
@yoshuawuyts
yoshuawuyts / Q&A.md
Created March 16, 2016 05:58 — forked from novaluke/0-Q&A.md
I want to use Nix for development, but... -- answers to common concerns about Nix

Nix seems perfect for developers - until I try to use it...

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.

anonymous
anonymous / gist:858586
Created March 7, 2011 14:51
game.components.core
(ns game.components.core
(:use
[clojure.contrib.def :only (defvar-)]
(game.utils [core :only (safe-merge
keywords-to-hash-map
get-unique-number
runmap
if-do
distinct-seq?)])))
@rastasheep
rastasheep / markdown.md
Created December 10, 2012 02:18
MiniTest quick reference

MiniTest::Spec

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
@benmoss
benmoss / deploy.rb
Created April 19, 2011 14:38
Configuring a remote sphinx server with Thinking Sphinx
# deploy.rb
namespace :ts_remote do
task :conf do
run <<-CMD
cd #{current_release}
&&
RAILS_ENV=#{rails_env} rake ts:conf
&&
rsync --progress #{current_release}/config/#{rails_env}.sphinx.conf sphinxsearch@db-server:/home/sphinxsearch/
@ibdknox
ibdknox / server.sh
Created August 4, 2011 06:13
example daemon for lein processes
#!/bin/bash
name=webnoir
pidfile=/var/run/$name.pid
if [ -f "$pidfile" ]; then
pid=`cat $pidfile`
running=`ps p $pid |wc -l`
if [ $running -eq 1 ]; then
pid=