emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
- Undo -
C-/
- Redo -
C-?
- Change case: 1. Camel Case :
M-c
2. Upper Case :M-u
- Lower Case :
M-l
# Android SDK setup | |
## Install Java | |
```bash | |
sudo apt-get update | |
sudo dpkg --add-architecture i386 | |
sudo apt-get install libbz2-1.0:i386 | |
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 | |
sudo apt-get install openjdk-8-jdk openjdk-8-jre |
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration." | |
(setq-default | |
;; List of additional paths where to look for configuration layers. | |
;; Paths must have a trailing slash (i.e. `~/.mycontribs/') | |
dotspacemacs-configuration-layer-path '() |
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/
C-?
M-c
2. Upper Case : M-u
M-l
module Main where | |
import Control.Monad.Trans | |
import Control.Monad.Trans.Either | |
import Safe | |
data Sensor = Temp | |
| Fuel | |
| Pressure |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
module Main where | |
import Database.PostgreSQL.Simple | |
import Data.Aeson hiding (json) | |
import Data.Monoid | |
import Data.Text (pack) | |
import GHC.Generics |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
import Control.Lens | |
import Data.Aeson | |
import qualified Data.ByteString.Lazy.Char8 as C | |
import GHC.Generics | |
-- For production code, use Text instead of String | |
data Person = Person { _personName :: String | |
, _personAge :: Int |
Chronological list of the "systemd for Administrators" series published on 0pointer.net/blog:
-- | Main entry point to the application. | |
module Main where | |
import Control.Monad.Reader | |
import Control.Monad.Writer | |
{- | |
The ReaderT transformer is used to retrieve a read-only value from some environment. | |
The WriterT transformer will log the result of each retrieval. | |
Running the two transformers together yields a log of each step along with the actual results. |