Skip to content

Instantly share code, notes, and snippets.

View metacritical's full-sized avatar
Creating Black holes.

Pankaj Doharey metacritical

Creating Black holes.
View GitHub Profile
@metacritical
metacritical / lgtm.md
Created October 24, 2017 13:33 — forked from nagua/lgtm.md
LGTM Markdown

LGTM

package main
import (
"encoding/hex"
"log"
"net"
"time"
)
const (
@metacritical
metacritical / Makefile
Created August 13, 2017 06:03 — forked from rauhs/Makefile
Compiling clojurescript + figwheel without boot nor leiningen. Using leiningen to manage dependencies. Print file size stats (raw, gzip, brotli) for production builds
CLJ_NREPL_PORT:=22340
FIGWHEEL_PORT:=22345
CLJS_JAR_VERSION:=1.7.48
CLJS_JAR_URL:=https://github.com/clojure/clojurescript/releases/download/r$(CLJS_JAR_VERSION)/cljs.jar
.PHONY: def_target
def_target : null
@metacritical
metacritical / gist:a7c7460b18f9bdb60d26f9ae95248f64
Created August 11, 2017 00:07 — forked from mikehaertl/gist:3258427
Learn you a Haskell - In a nutshell

Learn you a Haskell - In a nutshell

This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.


1. Introduction

  • Haskell is a functional programming language.
@metacritical
metacritical / 00-creating-a-ruby-extension.md
Created August 6, 2017 17:18 — forked from benolee/00-creating-a-ruby-extension.md
how easy it is to create and load a C extension in ruby

create a new dir

$ mkdir /tmp/ruby
$ cd /tmp/ruby

create extconf.rb

@metacritical
metacritical / pretty-report
Created August 6, 2017 15:22 — forked from thomaschrstnsn/pretty-report
ansi-color-fied report function for clojure.test
(ns pretty-report
(:require [clojure.test :refer :all]
[clojure.stacktrace :as stack]
[io.aviso.ansi :as a]))
(defmulti pretty-report :type)
(defmethod pretty-report :default [m]
(with-test-out (prn m)))
@metacritical
metacritical / edn-to-gregor.clj
Created July 28, 2017 09:23 — forked from tolitius/edn-to-gregor.clj
edn to gregor (kafka) conf
(require '[clojure.string :as s]
'[gregor.core :as gregor])
(defn to-prop [k]
(-> k name (s/replace #"-" ".")))
(defn to-props
"ranames keys by converting them to strings and substituting dashes with periods
only does top level keys"
[conf]
;;A useful init.el gist created from init.el at https://github.com/Fuco1/smartparens/issues/420
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
;; Grab the following packages if not already installed
@metacritical
metacritical / .spacemacs
Created July 25, 2017 09:06 — forked from cszentkiralyi/.spacemacs
Spacemacs config
;; -*- 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.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@metacritical
metacritical / snake.clj
Created July 14, 2017 19:58 — forked from terry3/snake.clj
Snake game in clojure v1.8
; This is a Swing-based game where the arrow keys to guide
; a snake to apples. Each time the snake eats an apple it
; grows and a new apple appears in a random location.
; If the head of the snake hits its body, you lose.
; If the snake grows to a length of 10, you win.
; In either case the game starts over with a new, baby snake.
;
; This was originally written by Abhishek Reddy.
; Mark Volkmann rewrote it in an attempt to make it easier to understand.