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
(defun xsel-select-text (text &optional push) | |
"See `x-select-text'." | |
(let* ((process-connection-type nil) | |
(proc (start-process "xsel" nil "xsel" "-b" "-i"))) | |
(process-send-string proc text) | |
(process-send-eof proc))) | |
(defun xsel-selection-value () | |
"See `x-cut-buffer-or-selection-value'." | |
(shell-command-to-string "xsel -b -o")) |
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 | |
. git-sh-setup | |
URL="$1" | |
host=${URL/:*/} | |
path=${URL/*:/} | |
ssh "$host" git ls-peer "$path" > $GIT_DIR/peer.tmp | |
eval `sed -n '1,/^$/p' $GIT_DIR/peer.tmp` |
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 | |
export GIT_DIR="$1" | |
echo "name=$(git config repo.name)" | |
echo "url=$(git config repo.url)" | |
echo | |
for i in $(git remote);do | |
git config remote.$i.url | |
done |
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
#include <stdio.h> | |
#include <string.h> | |
#include <gettext-po.h> | |
#include <unistd.h> | |
static void | |
err(int severity, | |
po_message_t msg, const char *filename, size_t lineno, | |
size_t column, int multiline_p, const char *msgstr) | |
{ |
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
From ca71ec8926ab5b640fcb566c324c17b2639680a4 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= <pclouds@gmail.com> | |
Date: Sun, 3 Jul 2011 17:52:25 +0700 | |
Subject: [PATCH] dash: grab keyboard after Super is pressed | |
--- | |
js/ui/overview.js | 43 ++++++++++++++++++++++++++++++++++++++----- | |
1 files changed, 38 insertions(+), 5 deletions(-) | |
diff --git a/js/ui/overview.js b/js/ui/overview.js |
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
#include "cache.h" | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <zlib.h> | |
#include <unistd.h> | |
#include <stdint.h> | |
int encode_varint(unsigned int value, char *buf) |
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/scheme-r5rs | |
;; Calculate Vietnam Personal Income Tax | |
;; Input in million VND | |
(let* ((thresholds '((09 . 0.00) | |
(02 . 0.05) | |
(03 . 0.10) | |
(05 . 0.15) | |
(10 . 0.20) | |
(20 . 0.25) |
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
;; Define your own rules here | |
;; return a pair of server address and port | |
(define (choose-proxy host) | |
(values host 80)) | |
(define (http-read-line port) | |
(read-line port #\newline #t)) | |
(define (read-write read-port write-port) | |
(define (do-read-write read-port write-port) |
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
(define-cise-macro define-enums | |
[(_ sym ...) (for-each define-enum sym ...)]) |
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 colorsys | |
CLUT = [ # color look-up table | |
# 8-bit, RGB hex | |
# Primary 3-bit (8 colors). Unique representation! | |
('00', '000000'), | |
('01', '800000'), | |
('02', '008000'), | |
('03', '808000'), |
OlderNewer