git show <hash>:<file>
git log -p <filename>
export const fetchTransactions = () => { | |
return { | |
type: "API_FETCH", | |
config: { | |
type: ACTIONS.FETCH_TRANSACTIONS, | |
action: () => axios.get(/* sample url */), | |
transform: response => response.data.result, | |
}, | |
}; | |
}; |
#!/usr/bin/env bash | |
# Installs NixOS on a Hetzner server, wiping the server. | |
# | |
# This is for a specific server configuration; adjust where needed. | |
# | |
# Prerequisites: | |
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc. | |
# | |
# Usage: |
version: '3' | |
services: | |
frontproxy: | |
image: traefik | |
command: --api --docker | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: |
// The classic AJAX call - dispatch before the request, and after it comes back | |
function myThunkActionCreator(someValue) { | |
return (dispatch, getState) => { | |
dispatch({type : "REQUEST_STARTED"}); | |
myAjaxLib.post("/someEndpoint", {data : someValue}) | |
.then( | |
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}), | |
error => dispatch({type : "REQUEST_FAILED", error : error}) | |
); |
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE, logShow) | |
import Data.Either (Either(..)) | |
import Data.Foldable (elem, notElem) | |
import Data.Int (toNumber) | |
import Data.Traversable (traverse) | |
import Data.Validation.Semigroup (invalid) |
!$THEME = "kauz-light" | |
!define C_WHITE #ffffff | |
!define C_GRAY1 #f0f0f0 | |
!define C_GRAY2 #e1e1e1 | |
!define C_GRAY3 #d2d2d2 | |
!define C_GRAY4 #c3c3c3 | |
!define C_GRAY5 #b4b4b4 | |
!define C_GRAY6 #a5a5a5 | |
!define C_GRAY7 #969696 |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |