Skip to content

Instantly share code, notes, and snippets.

View coldnew's full-sized avatar
💭
I may be slow to respond.

Yen-Chin,Lee coldnew

💭
I may be slow to respond.
View GitHub Profile

Install OS X 10.10 Yosemite in VirtualBox

(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)

Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.

(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)

@coldnew
coldnew / backup.sh
Last active August 29, 2015 14:20 — forked from petedoyle/backup.sh
#!/bin/bash
# Capture current date as a variable
DATE=`date +"%Y%m%d-%H:%M:%S"` # example output format: 20110925-21:10:36
echo -e "\nRecursively snapshotting storage pool with tag @BACKUP_$DATE"
echo "Running 'zfs snapshot -r storage@BACKUP_$DATE'"
time zfs snapshot -r storage@BACKUP_$DATE
echo -e "\n\nDeleting backups pool to make way for new backup (usually takes a few minutes)."
@coldnew
coldnew / repo-apply.sh
Last active August 29, 2015 14:21 — forked from gipi/repo-apply.sh
#!/bin/sh
## Script to patch up diff reated by `repo diff`
# from https://groups.google.com/d/msg/repo-discuss/43juvD1qGIQ/7maptZVcEjsJ
if [ -z "$1" ] || [ ! -e "$1" ]; then
echo "Usages: $0 <repo_diff_file>";
exit 0;
fi
rm -fr _tmp_splits*
@coldnew
coldnew / tictactoe.clj
Last active August 29, 2015 14:22 — forked from ponzao/tictactoe.clj
(defn solve
[grid]
(remove nil?
(run* [q]
(macro/symbol-macrolet [_ (lvar)]
(== q grid)
(conde
((== grid [[q _ _]
[_ q _]
[_ _ q]]))
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Martin Bean" />
<title>Twitter&rsquo;s Bootstrap with Ryan Fait&rsquo;s Sticky Footer</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<style>
html, body {
height: 100%;

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
I am now able to insert test-image.png in other.md file using ![..](test-image.png) as opposed to ![..](static/otherpage/test-image.png)
content
├── pages
│   ├── otherpage
│   │   ├── test-image.png
│   │   └── other.md
│   └── project
│   ├── another-image.png
│   └── project.md
@coldnew
coldnew / sudoku.clj
Last active August 29, 2015 14:26 — forked from orb/sudoku.clj
updated for the latest core.logic, with some minor tweaks for (I hope) clarity
(ns sudoku
(:refer-clojure :exclude [==])
(:use [clojure.core.logic])
(:require [clojure.core.logic.fd :as fd]))
(defn init-board [vars puzzle]
(matche [vars puzzle]
([[] []]
succeed)
From dac3e3b75f117dede7aa577d48fc10efb5a53dd1 Mon Sep 17 00:00:00 2001
From: Erik Larsson <[email protected]>
Date: Thu, 30 Oct 2014 10:49:03 +0100
Subject: [PATCH] Add fix to get QtWayland Compositor running on iMX6.
This patch is not really done yet, it's just some test.
Change-Id: If57be6d26b3d56a772db73d29cede6215f033a80
Signed-off-by: Erik Larsson <[email protected]>
---
@coldnew
coldnew / simple_frame.scm
Created October 15, 2015 05:49 — forked from alcidesfp/simple_frame.scm
Ejemplo Swing Kawa
;; -*- coding:utf-8; mode:Scheme -*-
"Shows howto use Java Swing classes in Kawa Scheme"
(define-alias JLabel javax.swing.JLabel)
(define-alias JButton javax.swing.JButton)
;;========================================================================
(define-simple-class SimpleFrame (javax.swing.JFrame)
;; members