Space *
: Search for word under cursorSpace t F
togglesauto-fill-mode
, which enables hard wrappingC-x f
callsset-fill-column
- sets the column to wrap atg q
to format (applies wrapping ifauto-fill-mode
enabled)Space s c
clears search term* e
edit word under cursor and change all in file/display (depending on mode)Space f y
echo and yank filename for current buffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clj-workshop.exercises) | |
(defn multiple-of | |
[n] | |
#(= 0 (mod % n))) | |
(defn ex1 | |
[] | |
(let [multiple-of-3? (multiple-of 3) | |
multiple-of-5? (multiple-of 5)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
db="$1" | |
out_dir="$2" | |
tables="$(mdb-tables -1 "$db")" | |
echo "$tables" | while read t; do | |
mdb-export "$db" "$t" > "${out_dir}/${t}.csv" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <mapnik/map.hpp> | |
#include <mapnik/datasource_cache.hpp> | |
#include "vector_tile_processor.hpp" | |
#include "mvt_from_geojson.h" | |
struct _mvtc_return { | |
mvtc_return_code return_code; | |
std::string message; |
Here be my notes while learining about GIS and web mapping for hastile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack --install-ghc runghc --package hasql | |
{-# LANGUAGE OverloadedStrings #-} | |
import Data.Monoid ((<>)) | |
import Hasql.Connection (acquire, release, settings) | |
import Hasql.Decoders (int8, singleRow, value) | |
import Hasql.Encoders (unit) | |
import Hasql.Query (statement) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
The Dell U2711 on screen display (OSD) can be locked - I think by holding the button immediately above the power button (referred to as button 5 in some places). In my case I locked it totally by accident, and without realising what I'd done.
Unlocking the OSD proved quite the production. I found a [forum post] that contained most of the answer. I'll repeat the useful bit below:
- Switch the monitor off
- Disconnect all monitor cabling from the PC (VGA, DVI, HDMI, DP, USB, etc.)
- Disconnect the monitor power cord from the rear of the monitor
- Press and hold the monitor power button in for 5 seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
BOARD_SIZE = 3 | |
CELLS = BOARD_SIZE ** 2 | |
MAGIC_SUM = 15 | |
MAGIC_SQUARE = [8,1,6,3,5,7,4,9,2] | |
SYMBOLS = [:naught, :cross] | |
Game = Struct.new(:board, :next_symbol, :winner) |
OlderNewer