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
@coldnew
coldnew / auto-deploy.md
Created December 7, 2015 03:49 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

(ns jsync.elevator
(:refer-clojure :exclude [map reduce into partition partition-by take merge])
(:require [clojure.core.async :refer :all :as async]))
;; This is necessary to check and see what is on the persistent queue
(defmethod print-method clojure.lang.PersistentQueue
[q, w]
(print-method '<- w)
(print-method (seq q) w)
(print-method '-< w))
@coldnew
coldnew / ClojureIntro.md
Created October 18, 2015 12:28 — forked from danmidwood/ClojureIntro.md
Evangelising Clojure at the Mind Candy Tech Forum

"Clojure Logo"

Let's REPL

In a terminal type: lein repl

; semi-colon marks the rest of the line as a comment
@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
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 / 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)
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

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
<!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%;
@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]]))