Skip to content

Instantly share code, notes, and snippets.

View bsima's full-sized avatar
drinking coffee

Ben Sima bsima

drinking coffee
View GitHub Profile
ben@neb:~$ curl -I https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
HTTP/2 200
accept-ranges: bytes
content-type: image/png
content-length: 5969
date: Fri, 13 Jul 2018 21:52:02 GMT
expires: Fri, 13 Jul 2018 21:52:02 GMT
cache-control: private, max-age=31536000
last-modified: Thu, 08 Dec 2016 01:00:57 GMT
x-content-type-options: nosniff
#!/usr/bin/env stack
-- stack --nix --resolver lts-11.7 script
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
import Data.List
import Control.Monad
import Control.Exception (assert)
[ben@lithium:~/src/pprjam]$ nixops modify -d pprjam ops/production.nix && nixops deploy -d pprjam
Warning: Permanently added '138.68.225.65' (ED25519) to the list of known hosts.
building all machine configurations...
building path(s) ‘/nix/store/jz1rq5fvi19idr126fpfj9c2sf1bal87-pprjam’
unpacking sources
unpacking source archive /nix/store/7f0rfvihfq5qlckls5rrxiazi7ifhra8-pprjam
source root is pprjam
patching sources
generated pprjam.cabal
installing
@bsima
bsima / production.nix
Last active December 8, 2019 22:41
production.nix
{
resources.sshKeyPairs.ssh-key = {};
pprjam =
{ config, pkgs, ... }:
let
pprjam = (import ../release.nix { inherit pkgs; }).pprjam // {
preInstall = ''
echo "======================================================="
echo "======================================================="
case msg of
AddUserResponse newUsers ->
let
(newUserList, cmd) =
RemoteData.update \(ls -> (List.append ls newUsers, Cmd.none)) model.users
in
( { model | users = newUserList }, cmd )
----
type alias VenueId =
String
type alias Venue =
{ id : VenueId
, name : String
}
type alias HappyHour =
title Git Good

This is a starting point for mastering git, a sisyphean task no doubt. Git is a complex software, nobody is expected to master all of it, so if you have a useful tip, please share!

The git manual pages are actually very good. Start with man git and maybe check out man gittutorial. Don't be shy about using `man

Get started:

  1. Install Leiningen
  2. Run lein new repl-sesh, then cd repl-sesh
  3. Open project.clj and change the clojure version to [org.clojure/clojure "1.9.0-alpha14"]
  4. lein repl and awaaaayy we go!

Resources

name: api
version: 0.1.0.0
synopsis: Initial project template from stack
description: Please see README.md
homepage: https://github.com/githubuser/api#readme
license: BSD3
license-file: LICENSE
author: Author name here
maintainer: example@example.com
copyright: 2016 Author name here