Skip to content

Instantly share code, notes, and snippets.

View lalitkale's full-sized avatar
🏠

Lalit Kale lalitkale

🏠
  • ATechieThought Labs
  • Dublin, Ireland
View GitHub Profile
@lalitkale
lalitkale / Zen of Python
Last active September 25, 2017 23:43
PEP-20
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
@lalitkale
lalitkale / gist:19face67b03d05072b73e97a19f0034a
Created July 9, 2016 21:20 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@lalitkale
lalitkale / latency.txt
Created August 14, 2016 21:15 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@lalitkale
lalitkale / gist:5aa44a1b596cd49e154891a8b3cf73f8
Last active December 8, 2017 17:36 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Collections.Generic;
public class SSEvent {
public string Name { get; set; }
public string Data { get; set; }

Visa requirements for UK conferences.

First you'll want to check if you need a visa to enter the UK.

  • Nationals of the EU, Switzerland, and EEA countries will not need a visa, and are free to work and conduct business in the UK.
  • Nationals from some designated countries such as USA may travel for tourist or business purposes under a visa exemption. The link above will detail what documents you need to provide in order to travel under a visa exemption.
  • Other nationals will need a visa.

The rules for allowable business travel under a visa exemption are covered by the same rules as those travelling under a vistor visa. If you will be travelling under a visa-exemption and the conference is covering your costs in any way you should make sure to read the relevant section below.

@lalitkale
lalitkale / kubectl-tips-tricks.md
Last active July 13, 2018 11:08
Kubectl Tips and Tricks

set the context to minikube running locally

kubectl config set-cluster minikube

create deployment yaml

kubectl run hello-world --image=myapp-container-image/k8s:1.0 --port=80 --dry-run -o yaml > myapp-deployment.yaml

create deployment yaml from existing deployment

kubectl get deployment hello-world -o yaml > my-existing-deployment.yaml

create servie yaml

@lalitkale
lalitkale / docker-useful-commands-for-debugging.md
Last active July 3, 2018 09:50
Docker Useful Commands for Debugging containers

Login inside the container/bash into container/get inside the container []=you need to replace it with your own container/image parameter

docker run -dit [image_name]

By ID

docker exec -i -t 665b4a1e17b6 /bin/bash

By Name

docker exec -i -t loving_heisenberg /bin/bash

@lalitkale
lalitkale / aks-restart-nodes.sh
Created July 3, 2018 15:50 — forked from tomasaschan/aks-restart-nodes.sh
Rolling restart of all nodes in an AKS cluster
#!/bin/bash
# TODO: probably accept these as CLI parameters or something
resourceGroup='<my-resource-group>'
cluster='<my-cluster-name>'
region='<my-region>'
group="MC_${resourceGroup}_${cluster}_$region"
function wait_for_status() {
@lalitkale
lalitkale / git tips
Created July 10, 2018 11:23 — forked from datawebbie/git tips
GIT Tips: When working in a multi OS team, make sure everyone in the team get their git line ending setting correctly. Not doing so could cause serious trouble later.
=== SETUP ===
For windows clients set autocrlf to true by typing:
$ git config --global core.autocrlf true
For Unix/Mac
$ git config --global core.autocrlf input
ALSO RUN this to change all file line endings on Linux/Mac
find . -name "*" -type f -exec dos2unix {} \;