Skip to content

Instantly share code, notes, and snippets.

View gwokudasam's full-sized avatar
:octocat:
Focusing

gwokudasam gwokudasam

:octocat:
Focusing
View GitHub Profile
@gwokudasam
gwokudasam / install.sh
Created February 23, 2021 11:03 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@gwokudasam
gwokudasam / .htaccess
Created October 3, 2019 06:54 — forked from sunuazizrahayu/.htaccess
Force https://www on Codeigniter with .htaccess
RewriteEngine on
#Force WWW
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
@gwokudasam
gwokudasam / .htaccess
Created October 3, 2019 06:53 — forked from hectorromo/.htaccess
www & https
RewriteEngine on
### WWW & HTTPS
# Force www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Force non-www:
@gwokudasam
gwokudasam / wildfly-install.sh
Created March 12, 2018 09:47 — 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
@gwokudasam
gwokudasam / install.sh
Created October 16, 2017 10:43 — forked from barbietunnie/install.sh
How to add Oracle JDBC driver in your Maven local repository
mvn install:install-file -Dfile={Path/to/your/ojdbc6.jar} -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
@gwokudasam
gwokudasam / SQLServer-APIPost.sql
Created August 18, 2017 07:53 — forked from theorigin/SQLServer-APIPost.sql
SQL Server code to POST to an API
DECLARE @Object AS INT;
DECLARE @ResponseText AS VARCHAR(8000);
DECLARE @Body AS VARCHAR(8000) =
'{
"what": 1,
"ever": "you",
"need": "to send as the body"
}'
EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;
package zw.co.poscloud.utilities;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.net.URI;
/**
* @Author : gwokudasam
* @Date : 5/8/2017
<profiles>
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<executions>
@gwokudasam
gwokudasam / docker-file-glassfish.sh
Created July 30, 2017 14:48 — forked from agritsik/docker-file-glassfish.sh
Docker file for glassfish
# Glassfish container configured for Blog app
#
# VERSION 0.1
FROM glassfish
MAINTAINER Andrii Grytsyk
RUN apt-get update
RUN curl http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar -o glassfish/lib/mysql-connector-java-5.1.34.jar
@gwokudasam
gwokudasam / ContainerConfiguration.java
Created March 12, 2017 18:06 — forked from drissamri/ContainerConfiguration.java
Enable HTTPS in Spring Boot
@Bean
public EmbeddedServletContainerFactory servletContainer() {
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory() {
@Override
protected void postProcessContext(Context context) {
SecurityConstraint securityConstraint = new SecurityConstraint();
securityConstraint.setUserConstraint("CONFIDENTIAL");
SecurityCollection collection = new SecurityCollection();
collection.addPattern("/*");
securityConstraint.addCollection(collection);