Skip to content

Instantly share code, notes, and snippets.

@charyorde
charyorde / haproxy.cfg
Created September 26, 2018 16:49 — forked from wiredmax/haproxy.cfg
Sample HA-Proxy configuration for load balancing SockJS running on Node.JS servers.
global
maxconn 10000 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
@charyorde
charyorde / Main.groovy
Created August 24, 2018 11:12 — forked from AlBaker/Main.groovy
Executable War Main
package mypackage;
import java.net.URL;
import java.security.ProtectionDomain
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
@charyorde
charyorde / gist:acc548f9f88567624bc8a3867e24ec63
Created June 12, 2018 15:43 — forked from steegi/gist:2934101
Script to drop all tables in a DB2 database
#/bin/sh
# Since there is no simple drop all tables from a database command in DB2,
# this script uses a few unix utilities to accomplish the same result
# Note that it assumes that your session is already connected to the database
# and that the schema from which you want to drop the tables has the same name
# as your current user.
db2 "Select 'DROP TABLE', TABLE_NAME from sysibm.tables WHERE TABLE_SCHEMA = UPPER('$USER')" | grep DROP | db2
@charyorde
charyorde / drop.sh
Created June 10, 2018 12:14 — forked from dsci/drop.sh
Dropping all tables in a PostgreSQL database
# first, login with psql
psql -U USERNAME -d databasename
# set output for all queries
\o FILENAME.sql
# run this query
select 'drop table ' || tablename || ' cascade;' from pg_tables;
# logout from psql
@charyorde
charyorde / 01-curl.go
Created May 19, 2017 08:08 — forked from jmoiron/01-curl.go
io.Reader & io.Writer fun
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func init() {
@charyorde
charyorde / countries.json
Created June 16, 2016 19:00 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@charyorde
charyorde / redis-delallbykey
Created May 20, 2016 08:35 — forked from mattweyant/redis-delallbykey
Delete all keys from Redis matching a regular expression
# All credit: http://stackoverflow.com/questions/4006324/how-to-atomically-delete-keys-matching-a-pattern-with-redis
redis-cli [options] KEYS "prefix:*" | xargs redis-cli [options] DEL
#!/bin/sh -x
## REST API JIRA KEY check
#List of projects that do not require strict JIRA KEY commits
#list in space and case-insensitive
#NON_STRICT=""
# Authentication credentials
username=kayode
[www]
ping.path = /ping
@charyorde
charyorde / pom.xml
Created February 6, 2014 04:32 — forked from zonski/pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.code</groupId>
<artifactId>google-closure-templates</artifactId>
<version>20120815</version>