Skip to content

Instantly share code, notes, and snippets.

View jamesnguyen101's full-sized avatar

Loi Nguyen jamesnguyen101

View GitHub Profile
@Goston
Goston / Client.java
Last active May 16, 2021 09:34
Apache Axis 1.4 WebService Client via TLS 1.2 @ JDK 1.6
// Call this first
AxisProperties.setProperty("axis.socketSecureFactory", MySocketFactory.class.getCanonicalName());
// Access your Web Services
WebServiceStub ws = (GSP2_NHICardSoap12Stub) new WebServiceLocator()...;
...
@mrbar42
mrbar42 / README.md
Last active June 24, 2024 12:40
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@chrisboulton
chrisboulton / ip_blacklist.lua
Last active May 23, 2024 07:53
Redis based IP blacklist for Nginx (LUA)
-- a quick LUA access script for nginx to check IP addresses against an
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403.
--
-- allows for a common blacklist to be shared between a bunch of nginx
-- web servers using a remote redis instance. lookups are cached for a
-- configurable period of time.
--
-- block an ip:
-- redis-cli SADD ip_blacklist 10.1.1.1
-- remove an ip:
package com.harshadura.gsm.smsdura;
import java.io.InputStream;
import java.io.PrintStream;
import org.smslib.AGateway;
import org.smslib.IOutboundMessageNotification;
import org.smslib.Library;
import org.smslib.OutboundMessage;
import org.smslib.Service;
import org.smslib.modem.SerialModemGateway;
@terrancesnyder
terrancesnyder / setenv.sh
Created May 23, 2011 00:07
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft