Put this in ~/.emacs.d/init.el
:
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'use-package)
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* | |
* BEWARE: | |
* This file uses the Option key as a meta key. This has the side-effect | |
* of overriding Mac OS keybindings for the option key, which generally |
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, options, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
/etc/nixos/hardware-configuration.nix |
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, options, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
/etc/nixos/hardware-configuration.nix |
Put this in ~/.emacs.d/init.el
:
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'use-package)
This config assumes you're using use-package to manage packages.
(use-package add-node-modules-path
:ensure)
(use-package eslint-fix
:ensure)
(use-package coffee-mode
:after (add-node-modules-path)
:config
I hereby claim:
To claim this, I am signing this object:
let evenNumbersAsString = numbers | |
.filter { $0 % 2 == 0 } | |
.map { NSNumberFormatter.localizedStringFromNumber($0, numberStyle: .DecimalStyle) } | |
.reduce("") { countElements($0) == 0 ? $1 : $0 + "\n" + $1 } | |
// "10,000\n50,000\n100,000\n1,000,000" |
let total = numbers.reduce(0) { $0 + $1 } | |
// 1302255 |
let evenNumbers = numbers.filter { $0 % 2 == 0 } | |
// [ 10000, 50000, 100000, 1000000 ] |
let formattedNumbers = numbers.map { NSNumberFormatter.localizedStringFromNumber($0, numberStyle: .DecimalStyle) } | |
// [ "10,000", "10,303", "30,913", "50,000", "100,000", "101,039", "1,000,000" ] |