Skip to content

Instantly share code, notes, and snippets.

@sffej
sffej / HTML5 Stub
Created April 1, 2021 02:11 — forked from joshuapowell/HTML5 Stub
A generic & empty HTML5 page structure.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="author" content="" />
<meta name="copyright" content="" />
<meta name="robots" content="index, follow" />
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
@sffej
sffej / JavaFXTrayIconSample.java
Created September 15, 2020 18:35 — forked from jewelsea/JavaFXTrayIconSample.java
Demonstrate using the System Tray (AWT) to control a JavaFX application.
import javafx.application.*;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.stage.*;
import javax.imageio.ImageIO;
import java.io.IOException;
@sffej
sffej / pom.xml
Created June 24, 2020 18:01 — forked from timmolderez/pom.xml
Adding dependencies to local .jar files in pom.xml
If you'd like to use a .jar file in your project, but it's not available in any Maven repository,
you can get around this by creating your own local repository. This is done as follows:
1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag):
<repositories>
<repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/libs</url>
@sffej
sffej / HelloWorld.java
Created July 1, 2019 20:26 — forked from jorgeatorres/HelloWorld.java
obfuscated HelloWorld java program
public class HelloWorld {public static void main(String[] args){
int[][] t = new int[][]{{202,1026,1100,396,324,1080,192,609,555,888,72,432},
{3,9,8,5},{2,2,5,9},{4,6,1,9,2,11},{4,6,1,9,3,2,11,7,0,5,10},{2,1,5,9},{1,9,2,5},{0,2,10,5,1,6,3,11,8,4},{10,4,2,6},
{1,10,2,3,5,9,7,4,11,6},{7,0,3,6},{2,9,10,1},{7,1,10,6},{12,0,-0}};do{while(t[13][1]+1<t[t[13][0]].length){
t[13][2]=t[0][t[t[13][0]][t[13][1]]];t[0][t[t[13][0]][t[13][1]]]=t[0][t[t[13][0]][++t[13][1]]];t[0][t[t[13][0]][t[13][1]++]]=t[13][2];}
}while(!(--t[13][0]<=(int)Math.sin(Math.PI))&&((t[13][1]=0)<1));
while(t[4][2]<=t[9][5]+3)System.out.print((char)(t[0][t[4][2]-1]/t[4][2]++));}}
@sffej
sffej / EDI_Formatter
Created June 25, 2019 03:27 — forked from bhattisatish/EDI_Formatter
EDI Custom Plugin for Notepad++
<NotepadPlus>
<UserLang name="X12" ext="">
<Settings>
<Global caseIgnored="no" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">000000</Keywords>
<Keywords name="Folder+"></Keywords>
@sffej
sffej / JDBCKerberosTest.java
Created March 4, 2019 23:54 — forked from guyinacube/JDBCKerberosTest.java
SQL JDBC Driver connectivity test for Kerberos
import java.sql.*;
import java.util.logging.*;
import java.io.IOException;
public class JDBCKerberosTest{
public static void main(String[] args) {
//Logger logger = Logger.getLogger("com.microsoft.sqlserver.jdbc");
@sffej
sffej / generate_uaa_keypair.sh
Created November 9, 2018 22:56 — forked from bijukunjummen/generate_uaa_keypair.sh
Generate a Signing Key and Verification Key for Cloud Foundry UAA
#!/bin/bash
openssl genrsa -out privkey.pem 2048
openssl rsa -pubout -in privkey.pem -out pubkey.pem
SIGNING_KEY=$(cat privkey.pem)
VERIFICATION_KEY=$(cat pubkey.pem)
JWT_SIGNING_KEYS=$(cat <<EOF
jwt:
token:
// ---- SAMPLE ENDPOINT ---- //
@RequestMapping(method = RequestMethod.GET, value = "users/{userId}")
Bookmark readUser(Principal principal, @PathVariable Long userId) {
return this.usersRepository.findOne(userId);
}
}
// ---- Configuration ---- //
@Configuration
@sffej
sffej / BENCHMARK.md
Created June 19, 2018 22:09 — forked from montanaflynn/BENCHMARK.md
Kong Benchmark Setup

To reproduce Kong's benchmark please follow these instructions.

Create AWS Instances

Spin up three m3.medium EC2 ubuntu 14.04 instances with public DNS enabled and configure them for high network traffic by increasing these limits:

Added fs.file-max=80000 to /etc/sysctl.conf

Added the following lines to /etc/security/limits.conf