This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
(ns gjs-example.core) | |
(defn main [] | |
(set! (-> js/imports .-gi .-versions .-Gtk) "3.0") | |
(let [Gtk (doto (-> js/imports .-gi .-Gtk) (.init nil)) | |
window (Gtk.Window. | |
(clj->js | |
{:type (-> Gtk .-WindowType .-TOPLEVEL) | |
:title "A default title" | |
:default_width 300 |
(ns gjs-example.core) | |
(defn main [] | |
(set! (-> js/imports .-gi .-versions .-Gtk) "3.0") | |
(let [Gtk (doto (-> js/imports .-gi .-Gtk) (.init nil)) | |
window (Gtk.Window. | |
(clj->js | |
{:type (-> Gtk .-WindowType .-TOPLEVEL) | |
:title "A default title" | |
:default_width 300 |
From a3febd1a49f259049d0d9650e297590b56d71ae4 Mon Sep 17 00:00:00 2001 | |
From: "Peter Y. Chuang" <peteryuchuang@gmail.com> | |
Date: Fri, 4 Aug 2017 00:24:36 +0200 | |
Subject: [PATCH libinput] udev: Add Apple SPI Keyboard and Touchpad | |
This enables touch-size-based palm rejection and disable-while-typing | |
touchpad feature for the SPI keyboards and touchpads inside the 12-inch | |
MacBooks and 2016 or later MacBook Pros. | |
--- | |
udev/90-libinput-model-quirks.hwdb | 8 ++++++++ |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
Rx.Observable | |
.interval(500) | |
.flatMap(() => [1, 2, 3] /* in angular you will call getData() to make an HTTP request */) | |
.map(x => x + 1) | |
.subscribe(x => console.log(x)) | |
function getData() { | |
return this.http | |
.get('https://api.spotify.com/v1/search?q=' + term + '&type=artist') | |
.map((response) => response.json()) |
Many languages support "expression-only" semantics, allowing to use any construct in an expression position.
NOTE: the difference between expressions and statements is that the former produce a value, while the later don't.
For example, Ruby's if
-expression:
x = 10
Service Worker - offline support for the web
Progressive apps - high-res icon, splash screen, no URL bar, etc.
'use strict'; | |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function() { | |
// Update 'version' if you need to refresh the cache | |
var staticCacheName = 'static'; | |
var version = 'v1::'; |
Usage:
To create a new branch that is up-to-date with the remote master:
$ ws 123
Creates the branch issue123
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |