Skip to content

Instantly share code, notes, and snippets.

@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 / 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
UAA_CONFIG_URL=file:///uaa.yml ./gradlew -Dspring.profiles.active=default,mysql run --info
issuer:
uri: http://localhost:8080/uaa
login:
url: http://localhost:8080/uaa
# SAML Key Configuration
# # The location and credentials of the certificate for this SP
# # See README.md for details on how to create this.
serviceProviderKey: |
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDHtC5gUXxBKpEqZTLkNvFwNGnNIkggNOwOQVNbpO0WVHIivig5
@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 / 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