Skip to content

Instantly share code, notes, and snippets.

View maleghast's full-sized avatar

Oliver Godby maleghast

View GitHub Profile
@maleghast
maleghast / 4clojure-26.clj
Created June 13, 2012 21:31
4-Clojure Problem #26 - Warning SPOILERS!
(fn [x] (take x ((fn fib [a b] (cons a (lazy-seq (fib b (+ a b))))) 1 1)))
@maleghast
maleghast / 4clojure41
Created June 17, 2012 20:25
4Clojure #41 SPOILERS!
(fn [s n] (flatten (map #(take (- n 1) %1) (partition-all n s))))
@maleghast
maleghast / 4clojure-42.clj
Created June 17, 2012 21:41
4Clojure #42 SPOILERS!
(fn [x] (reduce * (rest (range (+ x 1)))))
@maleghast
maleghast / gist:dc814c4f636dac8fc6d7
Created July 4, 2014 17:24
Dependency Part One

#Berliner and Core - The New Road...#

The recent changes to the Responsive News Codebase have raised some questions and concerns that we are going to try and address below.

##Why?##

  1. The most important reason in terms of immediate benefit that can be felt by everyone is the improvement in Build Speed. This can be split up into three results which we are already benefitting from:
    1. Our releases / deployments now include less RPMs, by default, meaning that our build process is shorter.
    2. This reduction in build "weight" means that the feedback cycle for engineers who are integrating new code is shorter / quicker.
    3. And so in turn we can integrate more things more quickly, as long as they continue to be lighter touches and smaller, more atomic changes.
  2. Architechtural Clarity. While there is no doubt that the Responsive News Codebase has always moved from a position of thoughtful technical design, it has become the consensus amongst the News Technical Leads that the future is going to necessitate
@maleghast
maleghast / gist:1498a6533968dd8a3131
Created September 9, 2014 12:09
Development Configs for Kaleidoscope

#Development Configs for Kaleidoscope#

##kaleidoscope-broker##

###app.json###

{
    "external_dependencies": {},
    "secure_configuration": {},

Keybase proof

I hereby claim:

  • I am maleghast on github.
  • I am olivergodby (https://keybase.io/olivergodby) on keybase.
  • I have a public key whose fingerprint is 5E75 076E 3E77 4AA7 514E 6ED8 2969 7477 D599 B31E

To claim this, I am signing this object:

@maleghast
maleghast / gist:0546ae26d81d1e40136b
Created March 11, 2016 07:31
Installing Composer (PHP package tool) on Amazon Linux
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install
(resource
{:id ::index
:methods
{:post
{:consumes "application/octet-stream"
:consumer (fn [ctx _ body-stream]
(let [f (java.io.File/createTempFile "yada" ".tmp" (io/file "/tmp"))]
(infof "Saving to file: %s" f)
(save-to-file
ctx body-stream
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@maleghast
maleghast / recent.git.alias.cmd
Created May 18, 2018 11:54
Git - Alias for recently committed branches
git config --global alias.recent "for-each-ref --format='%(refname:lstrip=2)' --sort=-committerdate refs/heads/ --count=5"