Skip to content

Instantly share code, notes, and snippets.

unknown1040f38b4e0e% salt aws launch
{:username=>"ubuntu",
:private_key_path=>"/Users/michaelgough/.ec2/frankey.pem",
:public_key_path=>"/Users/michaelgough/.ec2/frankey.pem.pub",
:tags=>{:name=>"development-master", :environment=>"development"},
:groups=>["development-master-frankey.pem"],
:flavor_id=>"m1.small",
:image_id=>"ami-0cdf4965"}
/Users/michaelgough/.rvm/gems/ruby-1.9.3-p429@salt/gems/excon-0.24.0/lib/excon/middlewares/expects.rb:10:in `response_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest)
from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429@salt/gems/excon-0.24.0/lib/excon/connection.rb:353:in `response'
;; app state changes but no update
;; please help
(ns app.mutations
(:require [untangled.client.mutations :as m]))
(defmethod m/mutate 'app/choose-tab [{:keys [state]} _ {:keys [tab]}]
{:action (fn []
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Clojure (Leiningen 2),Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Clojure (Leiningen 2) app detected
-----> Installing OpenJDK 1.8... done
-----> Installing Leiningen
Downloading: leiningen-2.6.1-standalone.jar
Writing: lein script
-----> Building with Leiningen
Running: lein uberjar
@fragamus
fragamus / gist:56e570e2df276de569c68d018d54aaae
Created April 25, 2017 17:50
For some reason i is always 0
filePathPipe :: MonadIO m => Pipe a a m ()
filePathPipe = filePathPipe2 0 where
filePathPipe2 i = do
x <- await
yield x
liftIO $ putStrLn $ show i
if (i `mod` 10 == 0)
then do
liftIO $ putStrLn "TEN"
filePathPipe2 (i+1)
@fragamus
fragamus / gist:3cc5ab02a9ea89c42111ed7069d7e53b
Created April 27, 2017 20:18
the function "middle" is funky
import Pipes
import Pipes.Core
import Control.Monad
import System.IO
main = runEffect loop
loop = for ((start >~> middle) ()) (lift . putStrLn)
start a = do
@fragamus
fragamus / gist:6a54eb38952aaeefdf32a5e0636cec11
Last active April 30, 2017 00:19
the counter handled by stateT isn't changing with modify (+1)
#!/usr/bin/env stack
-- stack --install-ghc runghc --package turtle
{-# LANGUAGE OverloadedStrings #-}
import Prelude hiding (FilePath)
import Turtle
import Control.Monad.State
import Data.Text
import Filesystem.Path.CurrentOS
import Data.Either
[root@ip-172-31-30-159:~]# nix-env -iA nixos.stack
installing ‘stack-1.5.1’
these paths will be fetched (3.47 MiB download, 22.51 MiB unpacked):
/nix/store/959h7dff5saa0k89v1gj73vk6k8vvb3q-stack-1.5.1
fetching path ‘/nix/store/959h7dff5saa0k89v1gj73vk6k8vvb3q-stack-1.5.1’...
*** Downloading ‘https://cache.nixos.org/nar/0xqf7whg0g6cfvkz7y3pgk3h5q5a9vhvs7dfn450fj4a0j4z9sy3.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/959h7dff5saa0k89v1gj73vk6k8vvb3q-stack-1.5.1’...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3549k 100 3549k 0 0 1774k 0 0:00:02 0:00:02 --:--:-- 1533k
@fragamus
fragamus / something strange in your neighborhood
Created February 21, 2018 04:33
Warning: something's wrong at /nix/store/vn1xs9s2akf79y1pbya2qldydbf2b22m-setup-etc.pl line 97.
[root@ip-172-31-17-67:~]# nixos-rebuild switch
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/21cbdgb388w46hc804bxj5xbyqqz2lfn-system-path.drv
/nix/store/34yywa3lf9lhxf5m0kgb0cn40fkqjmsi-unit-systemd-fsck-.service.drv
/nix/store/i5cgmwqhxv3k6q76333lib82kbi8z4ck-dbus-catalog.xml.drv
/nix/store/dpmsi0vqypw4fbcrmaf23rgr4bdmhp55-dbus-1.drv
/nix/store/7lw23ggpcgg28m1rd6w5mkbk2blxfgmh-unit-dbus.service.drv
/nix/store/45iipgh9p68zvc52a29366c5zf8lnixh-user-units.drv
@fragamus
fragamus / gist:daecb2f3ec1bd7c6df5e08e5f68aa2e5
Created February 26, 2018 20:54
Trying nix-build -A swift
running 17.09 stable, I did this:
git clone git@github.com:NixOS/nixpkgs.git
cd nixpkgs
nix-build -A swift
And I got this:
/tmp/nix-build-swift-4.0.3.drv-0/src/lldb/include/lldb/Utility/TaskPool.h:122:12: error: no member named 'bind' in namespace 'std'
@fragamus
fragamus / gist:400885f10809d35718209c22a24c51ad
Created March 8, 2018 06:19
neural not working in stack build
bash-3.2$ stack build
Building all executables for `malek' once. After a successful build of all of them, only specified executables will be rebuilt.
malek-0.1.0.0: build (lib + exe)
Preprocessing library for malek-0.1.0.0..
Building library for malek-0.1.0.0..
[1 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/Lib.o )
/Users/michaelgough/malek/malek/src/Lib.hs:12:1: error:
Could not find module ‘Data.MyPrelude’
Use -v to see a list of the files searched for.