Skip to content

Instantly share code, notes, and snippets.

Sridhar Ratnakumar srid

Block or report user

Report or block srid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am srid on github.
  • I am srid (https://keybase.io/srid) on keybase.
  • I have a public key ASBgNuV-ZMh9ZFRXeUJw4VQ8I3oA5MEZtDWmGw8Xl5dVDAo

To claim this, I am signing this object:

@srid
srid / jdg-email-expanded.md
Created Sep 6, 2019 — forked from ChristopherDavenport/jdg-email-expanded.md
Scala Community Email Regarding John De Goes
View jdg-email-expanded.md

We're aware that a private gist of a final draft posted by a committee member was publicly circulated. This was a private message to select members of the Scala community. We chose to keep our public statement brief out of courtesy to John. The text was authored by the Typelevel Steering Comittee which consists of Christopher Davenport, Alexandru Nedelcu, Ross A Baker, Daniel Spiewak, Miles Sabin, Lars Hupel, Rob Norris, Michael Pilquist, Kai Wang, and Luka Jacobowitz over the last 11 weeks.

For transparency the full text is included below:

Regarding John De Goes

We are contacting you privately to give you advance notice of disciplinary action we will be taking against John De Goes tomorrow.

Effective tomorrow morning, John De Goes will be indefinitely barred from participating in Typelevel projects, with the most relevant impact being on Cats Effect. This writing is an attempt to lay out the facts of the situation, with as much historical context as is rele

@srid
srid / zerocarb-cult.md
Last active Sep 14, 2019
r/zerocarb moderation reports
View zerocarb-cult.md

Reports of misbehaviour by r/zerocarb moderators

These are only a subset of various reports of misbehaviour reported of the r/zerocarb moderators.

View keybase.md

Keybase proof

I hereby claim:

  • I am srid on github.
  • I am srid (https://keybase.io/srid) on keybase.
  • I have a public key ASAqEshRptoKizpeGTfMV5sjYbb_zCN98gPS7ktevTg9Owo

To claim this, I am signing this object:

@srid
srid / FixedList.elm
Created Nov 17, 2016
Attempting fixed list in Elm
View FixedList.elm
module FixedList exposing (..)
type Nil a = Nil
type Cons fa a = Cons a fa
type alias FixedList0 a = Nil a
type alias FixedList1 a = Cons (FixedList0 a) a
type alias FixedList2 a = Cons (FixedList1 a) a
fl1 : FixedList1 Int
View hakyll.md

Using Hakyll with CircleCi and GitHub Pages

[Posted April 24, 2015; restored here for reference]

Today I switched this site from Jekyll to Hakyll, a Haskell library for generating static sites. It is still hosted in GitHub Pages, which only supports Jekyll. Therefore I had to find a Continuous Delivery service (CD) that will perform and connect the "missing piece," the stage that generates the HTML pages — in between a git push and pushing to GitHub pages. Here is how I did it.

The architecture

  1. For CD, we use CircleCI which hooks into the GitHub repo and monitors for any pushes. When a commit or more is pushed it will start the build per the configuration defined in cirle.yml in the repo. The first step runs cabal install which installs the Hakyll dependencies (including pandoc). This step takes a while — and the CircleCI UI provides excellent feedback on
@srid
srid / laundryCoins.hs
Last active Aug 29, 2015
laundryCoins.hs
View laundryCoins.hs
#!/usr/bin/env runhaskell
module Main where
data Coin = Quarter | Loonie deriving (Eq, Show)
type Cents = Int
cents :: Coin -> Cents
cents Quarter = 25
cents Loonie = 100
View jekyll-serve.el
(defun jekyll-serve ()
(interactive)
(let* ((default-directory
(if (string-match "_posts/$" default-directory)
(directory-parent default-directory)
default-directory))
(buffer (if (get-buffer "*jekyll*")
(switch-to-buffer "*jekyll*")
(ansi-term "/bin/bash" "jekyll")))
(proc (get-buffer-process buffer)))
@srid
srid / bash_prompt_sh
Last active Aug 29, 2015
stackato bash prompt
View bash_prompt_sh
#!/bin/bash -e
redis_hostport=$(cat /s/etc/kato/redis_uri | cut -d"/" -f3)
redis_host=$(echo $redis_hostport | cut -d: -f1)
redis_port=$(echo $redis_hostport | cut -d: -f2)
redis_cli="redis-cli -h ${redis_host} -p ${redis_port}"
user=$(whoami)
endpoint=$(timeout 0.1 $redis_cli get cluster | json endpoint)
ipaddr=$(timeout 0.1 /sbin/ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}')
roles=$(timeout 0.1 $redis_cli get node | json "[\"${ipaddr}\"]" | json roles | json -ak | paste -sd "," -)
View docker-registry-readonly.go
// read-only registry API server
// TODO:
// * directly read from the .tar file (will break martini.Static)
// * UX friendly error handling
package main
import (
"encoding/json"
You can’t perform that action at this time.