Skip to content

Instantly share code, notes, and snippets.

View karuppiah7890's full-sized avatar
😄
"When given the choice between being right or being kind, choose kind" Dr Wayne

Karuppiah Natarajan karuppiah7890

😄
"When given the choice between being right or being kind, choose kind" Dr Wayne
View GitHub Profile
@b1zantine
b1zantine / 51-android.rules
Created January 27, 2016 09:07
udev rules for android device
# udev rule to detect android devices
# These rules refer to http://developer.android.com/tools/device.html
# Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev"
# Archos
SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
# Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
# Azpen Onda
@odysseas
odysseas / QuoteGenerator.markdown
Last active June 28, 2017 15:35
Random Quote Generator
@aftabsikander
aftabsikander / MainActivity
Created September 25, 2014 12:24
How to create Custom Span
import android.app.Activity;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.StyleSpan;
import android.view.View;
@kentcdodds
kentcdodds / README.md
Last active March 11, 2021 01:41
JavaScript Program Slicing with SliceJS
@stubailo
stubailo / fetch-graphql.js
Created September 5, 2017 08:15
Call a GraphQL API with fetch
require('isomorphic-fetch');
fetch('https://1jzxrj179.lp.gql.zone/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: '{ posts { title } }' }),
})
.then(res => res.json())
.then(res => console.log(res.data));
@orta
orta / me.txt
Last active June 19, 2023 12:09
whoami
Since 2013 I've worked entirely in the open, lowering the barriers to different
developer ecosystems as one of the most active users on GitHub.
I've helped big OSS projects with design, project management and occasionally code.

Kubernetes API Internals Codebase Walkthrough

The JSON file included in this gist gives a codebase walkthrough of the resource handling in the k8s apiserver.

The codebase walkthrough is created using CodeTour VS Code extension. To display the walkthrough in VS Code, use the JSON file using the Opening Tours functionality.

You might need to first open the workspace at the apiserver directory.

@shukla2112
shukla2112 / redis_key_sizes.sh
Created July 27, 2017 09:56 — forked from epicserve/redis_key_sizes.sh
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License: http://www.apache.org/licenses/LICENSE-2.0
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
}
@shukla2112
shukla2112 / pgOpsGuide.md
Last active October 20, 2023 07:27
Postgresql operations

This guide includes queries for postgreql

misc/utility commands

Set pager off

\pset pager off
  1. Check when vaccum was run