Skip to content

Instantly share code, notes, and snippets.

View softmentor's full-sized avatar

Jiny Thattil softmentor

  • Bangalore, India
View GitHub Profile
from datetime import datetime, timedelta
from collections import defaultdict
"""
Based on the work done on this paper
https://www.conviva.com/wp-content/uploads/2023/01/Raising-the-Level-of-Abstraction-for-Time-State-Analytics.pdf
Neat work C3!
"""
class Event:
"""
@softmentor
softmentor / osx-setup.sh
Created February 19, 2018 02:39 — forked from somebox/osx-setup.sh
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
@softmentor
softmentor / service-checklist.md
Created May 2, 2017 21:56 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@softmentor
softmentor / gist:3a51f995fa50e150a1aca0828e0137f8
Created July 1, 2016 04:45 — forked from gregsexton/gist:8195599
My rsync-based backup script
#! /bin/zsh
# Backup script written by Greg Sexton
# bomb out on first non-zero exit code
set -e
trap 'echo !!! BACKUP EXITED WITH ERROR STATUS !!!' ERR
DATE=$(date "+%Y-%m-%dT%H:%M:%S")
ROOT=/mnt/backup
BACKUP_PREFIX="bak-"
@softmentor
softmentor / markdown.md
Created May 31, 2016 05:19 — forked from jonschlinkert/markdown-cheatsheet.md
A better markdown cheatsheet. I used Bootstrap's Base CSS documentation as a reference.

Typography

Headings

Headings from h1 through h6 are constructed with a # for each level:

# h1 Heading
## h2 Heading
### h3 Heading
@softmentor
softmentor / fix_github_https_repo.sh
Created February 25, 2016 08:56 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@softmentor
softmentor / introrx.md
Created February 21, 2016 06:05 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@softmentor
softmentor / docker-resources.md
Created October 27, 2015 20:53 — forked from rgaidot/docker-resources.md
Docker Resources All In One - A collection of docker online resources
@softmentor
softmentor / monitoring.md
Created October 27, 2015 20:46 — forked from ceejbot/monitoring.md
monitoring manifesto

monitoring: what I want

I've recently shifted from a straight engineering job to a job with a "dev/ops" title. What I have discovered in operations land depresses me. The shoemaker's children are going unshod. Operations software is terrible.

What's driving me craziest right now is my monitoring system.

what I have right now

What I have right now is Nagios.

@softmentor
softmentor / gist:89da0006cabfeb8613dc
Created October 27, 2015 20:40 — forked from edasque/gist:1c8a8b653014ee158202
HTML/JS/CSS snippet for listing dashboard in a Grafana text panel (in HTML mode)
<style type="text/css">
#dashboard_list ul {
margin:20px, 40px, 40px, 10px;
overflow:hidden;
}
#dashboard_list li {
line-height:1.5em;
float:left;
display:inline;
}