Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

{
"title": "Change caps_lock key (rev 2)",
"rules": [
{
"description": "Change caps_lock key to command+control+option+shift. (Post escape key when pressed alone)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",

(put! ch val) - Puts a value onto a channel, doesn't block at all. (>! ch val) - Puts a value onto a channel, "blocks" in a go block (parks). (>!! ch val) - Puts a value onto a channel, blocks. Not available in js.

(take! ch cb) - Takes a value from a channel, doesn't block at all. Take a callback fn. (<! ch) - Takes a value from a channel, "blocks" in a go block (parks). (<!! ch) - Takes a value form a channel, blocks. Not available in js.

Let's compare core.async with three prominent async strategies in Javascript:

Purposely directing and redirecting your attention is an important part of meditation training. You want to continuously cultivate your ability to intentionally direct attention to any object you choose, regardless of its intrinsic interest. You do this by redirecting attention, over and over again, back to the meditation object whenever it wanders. This is how directed attention leads to stable attention. If you’re reluctant to let go of an object you find particularly engaging, evoke discipline and diligence. Discipline doesn’t mean forcing the mind to do something it can’t, but rather a firm, intentional resolve to let go of an object that’s captured your attention and return to the breath. Being diligent means doing this consistently and promptly.

Like a muscle, the more you exercise this faculty, the stronger it grows. In other words, your conscious intention to redirect attention, repeated often enough, will gradually train your unconscious to do it automatically and almost instantly. Then, intentional

“Purposely directing and redirecting your attention is an important part of meditation training. You want to continuously cultivate your ability to intentionally direct attention to any object you choose, regardless of its intrinsic interest. You do this by redirecting attention, over and over again, back to the meditation object whenever it wanders. This is how directed attention leads to stable attention. If you’re reluctant to let go of an object you find particularly engaging, evoke discipline and diligence. Discipline doesn’t mean forcing the mind to do something it can’t, but rather a firm, intentional resolve to let go of an object that’s captured your attention and return to the breath. Being diligent means doing this consistently and promptly.”
@knubie
knubie / jp-you.md
Last active October 29, 2017 16:32

よう

The word よう(様) means appearance or manner. Because it is a noun we can modify it with い-adjectives or descriptive clauses.


RELATIVE-CLAUSE + よう

*Aようだ seems like A

In this ussage a relative clause can be anything that is able to directly modify a noun, including い-adjectives, conjugated state-of-being, and verb-clauses.

Examples

;;; nlinum-relative.el --- Relative line number with nlinum -*- lexical-binding: t; -*-
;; Copyright (C) 2016 codefalling
;; Author: codefalling <code.falling@gmail.com>
;; Keywords: convenience
;; Package-Version: 20160526.8
;; Version: 0.1
;; Package-Requires: ((emacs "24.4") (nlinum "1.5"))
...
// makePly :: (Game, Ply) -> Game
var makePly = function(game, ply) {
check(arguments, [Game]);
if (ply.type === 'MovePly') {
return movePly(
Piece.of(R.evolve({position: Position.of}, ply.piece)),
Position.of(ply.position),
game);
@knubie
knubie / sanctuary-dom.js
Last active September 8, 2016 01:07
Messing around with DOM parsing using sanctuary.js
const R = require('ramda');
const Sanctuary = require('sanctuary');
const $ = require('sanctuary-def');
//=============================
// Type definitions
//=============================
// Tokens :: Array String
const Tokens = $.NullaryType(
@knubie
knubie / foo.sql
Last active August 16, 2016 21:36
CREATE OR REPLACE FUNCTION days_remaining(users)
RETURNS interval AS $$
SELECT (start_date + (commitment_term * '1 month'::INTERVAL)) - current_date FROM users JOIN memberships ON ($1.id = memberships.user_id)
$$ STABLE LANGUAGE SQL;
...
option "override-system-vi", "Override system vi"
option "disable-nls", "Build vim without National Language Support (translated messages, keymaps)"
option "with-client-server", "Enable client/server mode"
option "revert-fold-patch", "Reverts path 7.4.700, which break folding"
...
if build.with? "revert-fold-patch"