Skip to content

Instantly share code, notes, and snippets.

View gigenthomas's full-sized avatar
🎯
Focusing

Gigen Thomas gigenthomas

🎯
Focusing
View GitHub Profile
@gigenthomas
gigenthomas / app.js
Last active August 29, 2015 13:57 — forked from ggoodman/app.js
var app = angular.module('plunker', ['ngGrid']);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.fruits = [ 'Apple', 'Orange' ,'Banana'];
$scope.myData = [
{name: "Moroni", age: 50},
@gigenthomas
gigenthomas / schema.sql
Created October 10, 2015 18:10 — forked from fernandomantoan/schema.sql
Schema for PostgreSQL to use with JdbcTokenStore (Spring Security OAuth2)
create table oauth_client_details (
client_id VARCHAR(256) PRIMARY KEY,
resource_ids VARCHAR(256),
client_secret VARCHAR(256),
scope VARCHAR(256),
authorized_grant_types VARCHAR(256),
web_server_redirect_uri VARCHAR(256),
authorities VARCHAR(256),
access_token_validity INTEGER,
refresh_token_validity INTEGER,
user jessed staff;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
@gigenthomas
gigenthomas / api.proxy.server.js
Created December 3, 2015 04:58 — forked from davemo/api.proxy.server.js
A simple express.js server with a proxy that intercepts all requests with /api/ and proxies them to localhost:3000
var express = require('express'),
httpProxy = require('http-proxy'),
app = express();
var proxy = new httpProxy.RoutingProxy();
function apiProxy(host, port) {
return function(req, res, next) {
if(req.url.match(new RegExp('^\/api\/'))) {
proxy.proxyRequest(req, res, {host: host, port: port});
@gigenthomas
gigenthomas / client.go
Created January 21, 2016 06:56 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@gigenthomas
gigenthomas / Article.java
Created February 23, 2016 06:51 — forked from php-coder/Article.java
JPA @EntityListeners example
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@gigenthomas
gigenthomas / golang_on_rpi.md
Created December 18, 2016 23:18 — forked from konradko/golang_on_rpi.md
Install Golang 1.7 on Raspberry Pi
wget https://storage.googleapis.com/golang/go1.7.linux-armv6l.tar.gz
tar -C /usr/local -xzf go1.7.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
@gigenthomas
gigenthomas / install.sh
Created March 1, 2017 07:17 — forked from mkubenka/install.sh
OpenVPN Access Server Letsencrypt
#!/bin/sh
apt-get -y install git bc
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
mkdir /etc/letsencrypt

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@gigenthomas
gigenthomas / wildfly-install.sh
Created May 12, 2017 05:13 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final