Skip to content

Instantly share code, notes, and snippets.

@redguardtoo
redguardtoo / sort-chinese-word-list.el
Created May 24, 2020 13:16
Sort Chinese word list by pinyin
(defconst my-chinese-pinyin-order-hash
#s(hash-table size 30 test equal data (
"一" 375
"乙" 381
"二" 81
"十" 293
"丁" 72
"厂" 35
"七" 264
"卜" 20
@yogthos
yogthos / clojure-beginner.md
Last active June 16, 2024 13:22
Clojure beginner resources

Introductory resources

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

@syohex
syohex / Cask
Last active December 24, 2018 21:13
My simple Emacs configuration
(source gnu)
(source melpa)
(depends-on "evil")
;; company-mode
(depends-on "company")
;; region
(depends-on "wrap-region")
@CMCDragonkai
CMCDragonkai / prolog_interesting_things.md
Last active January 5, 2019 15:36
Prolog: Interesting Things about Prolog

Interesting Things about Prolog

  1. Facts = Axioms
  2. Rules = Relations = Predicates

There are 2 types of knowledge in Prolog: Axiomatic Knowledge and Consequent Inferred Knowledge.

Axiomatic knowledge is the knowledge that you write as facts (and as rule predicates) in Prolog. Prolog cannot retract any of these axioms after being written (you can't do this at compile time nor at run time). This is called non-monotonic logic.

@jasongilman
jasongilman / atom_clojure_setup.md
Last active May 11, 2024 02:25
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@jlongster
jlongster / immutable-libraries.md
Last active May 6, 2024 12:37
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

@elad
elad / neural-style-ec2.txt
Created September 7, 2015 08:09
Running neural-style in EC2
Start a g2.2xlarge or better (GPU instance) with https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-ffba7b94
Login, username is ubuntu
Update a bunch of stuff and make sure cudnn R2 is used:
luarocks install image
luarocks install loadcaffe
luarocks install torch
export LD_LIBRARY_PATH=/home/ubuntu/torch-distro/install/lib:/home/ubuntu/torch-distro/install/lib:/home/ubuntu/cudnn-6.5-linux-x64-v2-rc2
@robertsdionne
robertsdionne / deepdream-install.md
Last active February 15, 2021 16:07
Deepdream installation
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
@a3ammar
a3ammar / color-picker
Last active March 21, 2022 09:20
Use OS X Color Picker in Emacs
(defun custom-color--choose-action (widget &optional _event) ; this function is only needed if you want to use color-picker in Easy Customization
"customize `widget-color--chose-action' to not split the screen"
(list-colors-display
nil nil
`(lambda (color)
(when (buffer-live-p ,(current-buffer))
(widget-value-set ',(widget-get widget :parent) color)
(pop-to-buffer ,(current-buffer))))))
(defun nscolor2hex (color)