Skip to content

Instantly share code, notes, and snippets.

View nisanthchunduru's full-sized avatar

Nisanth Chunduru nisanthchunduru

View GitHub Profile
@nisanthchunduru
nisanthchunduru / 176_9_149_227_interfaces
Created August 22, 2017 18:19
Missing IPv6 Configuration
root@Ubuntu-1604-xenial-64-minimal ~ # cat /etc/network/interfaces
### Hetzner Online GmbH installimage
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eth0
@nisanthchunduru
nisanthchunduru / edid-decode source URL
Created July 27, 2017 19:35 — forked from OneSadCookie/edid-decode source URL
EDID decoding on the Mac, to find out what resolutions and rates the Mac is seeing reported.
http://cgit.freedesktop.org/xorg/app/edid-decode/plain/edid-decode.c
compile with:
gcc edid-decode.c -o edid-decode
get EDID from IORegistryExplorer (mine, an old 24" Apple Cinema Display, is attached).
Convert to binary with this command:
ruby -e 'File.open("edid", "wb").write(File.read("edid.txt").split.map { |s| ("0x"+s).to_i(16) }.inject("", "<<"))'
@nisanthchunduru
nisanthchunduru / README.md
Last active July 26, 2017 14:47
zsh function to quick convert an issue to a pull request

Run

issuetopr 1256

to convert issue 1256 to a pull request.

Copy the function issuetopr to your .bashrc or .zshrc to start using it.

@nisanthchunduru
nisanthchunduru / magicbell.io
Last active July 7, 2017 10:30
Example nginx configuration file for phusion passenger open source
server {
listen 443;
root /home/rails/apps/magicbell_site/current/public;
server_name magicbell.io;
# Use certificates we purchased from https://www.ssl2buy.com
ssl on;
ssl_certificate /etc/nginx/certs/magicbell.io/magicbell.io.crt;
ssl_certificate_key /etc/nginx/certs/magicbell.io/magicbell.io.key;
@nisanthchunduru
nisanthchunduru / backup_dotfiles.rb
Created June 12, 2017 10:36
Backup dotfiles that RCM already tracks
require "fileutils"
class DotfileInfo
def initialize(dotfile_info_string)
@dotfile_info_string = dotfile_info_string
end
def path
@dotfile_info_string.split(":")[0]
end
<?PHP
/**
* pingdom.php
*
* This application will check your server swap, hard drive, cpu, and MySQL conditions.
* It will then generate an appropriate XML file for a Pingdom HTTP Custom check.
*
* If any usage is above your preset thresholds, then a down message will be returned,
* indicating that your server may be under more load than usual, hopefully, providing
* a bit of advanced notice before a true failure due to lack of resources
@nisanthchunduru
nisanthchunduru / newrelic-plugin-agent.cfg
Last active November 1, 2016 06:27
New Relic Postfix Plugin Example Configuration
%YAML 1.2
---
Application:
license_key: YOUR_NEWRELIC_LICENSE_KEY
wake_interval: 60
#newrelic_api_timeout: 10
#proxy: http://localhost:8080
postfix: {}
Thread 2 (Thread 0x7fda555c0700 (LWP 2244)):
#0 0x00007fda55786883 in poll () from /lib/libc.so.6
#1 0x00007fda566d6809 in timer_thread_sleep (p=<value optimized out>) at thread_pthread.c:1438
#2 thread_timer (p=<value optimized out>) at thread_pthread.c:1549
#3 0x00007fda562ef8ca in start_thread () from /lib/libpthread.so.0
#4 0x00007fda557917dd in clone () from /lib/libc.so.6
#5 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7fda56bb4700 (LWP 2242)):
@nisanthchunduru
nisanthchunduru / introduce_python_to_bao.py
Created June 20, 2016 11:07
Introducing python to Bao
import is_holding_yellow_box
# This is a solution for tutorial 3
def solution_for_tutorial_3
down
right
if is_holding_yellow_box
right
down
left
@nisanthchunduru
nisanthchunduru / GETTING_STARTED.md
Created June 17, 2016 06:23
Factory Girl 3.2.0 Getting Started Guide

Getting Started

Update Your Gemfile

If you're using Rails, you'll need to change the required version of factory_girl_rails:

gem "factory_girl_rails", "~&gt; 3.0"