Skip to content

Instantly share code, notes, and snippets.

Shyam Sundar shyam

Block or report user

Report or block shyam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shyam / helloworld-deployment-and-service.yml
Created Jun 14, 2018
k8s - test deployment, service and nginx ingress
View helloworld-deployment-and-service.yml
apiVersion: apps/v1beta2
kind: Deployment
name: helloworld-deployment
app: helloworld
replicas: 4
View rb_thread_fd_close-ruby2.3.4.patch
--- branches/ruby_2_3/thread.c 2017/04/09 11:53:53 58288
+++ branches/ruby_2_3/thread.c 2017/04/09 13:26:01 58289
@@ -2187,6 +2187,12 @@
return busy;
+rb_thread_fd_close(int fd)
+ while (rb_notify_fd_close(fd));
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
View Disable strict mode in homebrew mysql
(ffr@ffr:mysql [master] ❷ ->0)$ cat /usr/local/opt/mysql/my.cnf
shyam / nginx
Created May 22, 2012
Nginx init script
View nginx
# nginx - this script starts and stops the nginx daemon
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /opt/nginx/conf/nginx.conf
# pidfile: /opt/nginx/logs/
shyam / gist:1940844
Created Feb 29, 2012 — forked from lelayf/gist:1929949
Procedure for installing and setting Sun JDK Java 6 on Amazon Linux AMI 64bit
View gist:1940844
# Get latest Sun Java SDK in v6 from Oracle
# make it exec
chmod +x jdk-6u31-linux-x64-rpm.bin
# Install Java
sudo ./jdk-6u31-linux-x64-rpm.bin
# Check if the default java version is set to sun jdk
shyam /
Created Oct 7, 2011
comping OpenOffice.org3 3.3.0 for headless mode operations ( like watermarking, pdf processing, etc., )
# tested on an EL5/EL6 based platform
cd ~
yum -y install perl-Archive-Zip ant flex pam-devel cups-devel gperf libxslt-devel openldap-devel gstreamer-devel gstreamer-plugins-base-devel db4-devel unixODBC-devel xalan-j2 boost-devel unixODBC-devel qt-devel subversion autoconf automake gtk2-devel gcc-c++ gnome-vfs2-devel rpm-build expat-devel python-devel curl-devel gcc gcc-c++ java-1.6.0-openjdk-devel libIDL-devel libXaw-devel bison libX11-devel libXrender-devel libXrandr-devel screen
wget -O ~/.screenrc
shyam / dot-screenrc
Created Sep 28, 2011
screenrc file ( author - anonmymous )
View dot-screenrc
### I got tired of .screenrc's on the internet being so
### poorly commented... So being a good GNUbie I took matters
### into my own hands; and wrote this dotfile.
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
## Explanation of hardstatus line ##
# Ignore the ' marks if you use these examples for yourself
shyam /
Created Sep 22, 2011
Installing Ruby 1.9.x from source on Linux ( Debian/Ubuntu and RHEL/CentOS )
# Note: This script show how to compile ruby-1.9.2-p290. It can also be used for 1.9.3-p0 or higher versions.
# Dependencies
# Debian and derivatives:
# aptitude install build-essential libssl-dev libcurl4-openssl-dev libreadline5-dev zlib1g-dev libxslt1-dev libxml2-dev
You can’t perform that action at this time.