Skip to content

Instantly share code, notes, and snippets.

View imkarthikk's full-sized avatar
:bowtie:
Focusing

Karthik Kamalakannan imkarthikk

:bowtie:
Focusing
View GitHub Profile
#!/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 February 7, 2018 04:35
Grafana + InfluxDB + Docker for real-time dashboards
### 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 February 7, 2018 04:33
Grafana + InfluxDB + Docker for real-time dashboards
### 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 \
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 \
# [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
# 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 December 14, 2015 12:22 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# 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 December 8, 2015 14:00 — forked from yocontra/LazyLoad.js
lazy loading react components, useful for video/audio/etc
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 November 12, 2015 05:56 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

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 November 12, 2015 04:49
Setup a fresh install OS X 10.11.x El Capitan for developers

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