Skip to content

Instantly share code, notes, and snippets.

Avatar
🚩
Focusing

Karthik Kamalakannan imkarthikk

🚩
Focusing
View GitHub Profile
View Redis.sh
#!/bin/bash
#########################################
# This script will install redis,
# and download a pre-configured config
#########################################
### Set the log file path
cd ~
set_log_path=$(cd && pwd)
log_file="$set_log_path/skcript.log"
@imkarthikk
imkarthikk / InfluxDB Dockerfile
Created Feb 7, 2018
Grafana + InfluxDB + Docker for real-time dashboards
View InfluxDB Dockerfile
### Get InfluxDB up and running for your Grafana stack
docker run -d -p 8086:8086 -p 2003:2003 -p 8083:8083 \
-e INFLUXDB_GRAPHITE_ENABLED=true \
-e INFLUXDB_ADMIN_ENABLED=true \
influxdb
@imkarthikk
imkarthikk / Grafana Dockerfile
Created Feb 7, 2018
Grafana + InfluxDB + Docker for real-time dashboards
View Grafana Dockerfile
### Get a Grafana instance up and running with persistent storage
### Grafana Dockerfile
### Create a storage:
docker run -d -v /var/lib/grafana --name grafana-storage busybox:latest
### Run Grafana
docker run \
-d \
View Grafana_Docker_Setup
docker run -d -p 8086:8086 -p 2003:2003 -p 8083:8083 \
-e INFLUXDB_GRAPHITE_ENABLED=true \
-e INFLUXDB_ADMIN_ENABLED=true \
influxdb
docker run \
-d \
-p 3000:3000 \
--name=grafana \
--volumes-from grafana-storage \
View focus.conf
# [General]
0.0.0.0 instagram.com
0.0.0.0 kickass.cd
0.0.0.0 ewatchseries.to
0.0.0.0 mqtt-mini.facebook.com
0.0.0.0 fmovies.is
View Jekyll-S3.sh
# Run it from the root of your Jekyll site like bash Jekyll-S3.sh
##
# Configuration options
##
STAGING_BUCKET='s3://<YOUR-S3-BUCKET-NAME>'
LIVE_BUCKET='s3://<YOUR-S3-BUCKET-NAME>'
SITE_DIR='_site/'
##
@imkarthikk
imkarthikk / nginx.conf
Created Dec 14, 2015 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
View nginx.conf
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers
@imkarthikk
imkarthikk / LazyLoad.js
Created Dec 8, 2015 — forked from contra/LazyLoad.js
lazy loading react components, useful for video/audio/etc
View LazyLoad.js
var React = require('react');
var events = require('add-event-listener');
var isVisible = require('../isVisible');
var LazyLoad = React.createClass({
displayName: 'LazyLoad',
propTypes: {
distance: React.PropTypes.number,
component: React.PropTypes.node.isRequired,
children: React.PropTypes.node.isRequired
@imkarthikk
imkarthikk / gist:036c48a03e237288957f
Created Nov 12, 2015 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
View gist:036c48a03e237288957f

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@imkarthikk
imkarthikk / OSX-ElCap-Setup.md
Last active Nov 12, 2015
Setup a fresh install OS X 10.11.x El Capitan for developers
View OSX-ElCap-Setup.md

Setup the basics

# Default TextEdit to Plaintext and not Rich Text
defaults write com.apple.TextEdit RichText -int 0

# Set the scope of new Finder search to current directory
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

# Enable Screensaver for Top-Left hotspot
You can’t perform that action at this time.