Skip to content

Instantly share code, notes, and snippets.

View Haarolean's full-sized avatar
🚀
Commencing countdown, engines on

Roman Zabaluev Haarolean

🚀
Commencing countdown, engines on
View GitHub Profile
@inetbiz
inetbiz / issue.txt
Last active August 8, 2019 21:37
Secure Shell Daemon Enhanced Configuration
This computer system is for authorized users only. Individuals using this
system without authority or in excess of their authority are subject to
having all their activities on this system monitored and recorded or
examined by any authorized person, including law enforcement, as system
personnel deem appropriate. In the course of monitoring individuals
improperly using the system or in the course of system maintenance, the
activities of authorized users may also be monitored and recorded. Any
material so recorded may be disclosed as appropriate. Anyone using this
system consents to these terms.
@thom-nic
thom-nic / build.gradle
Last active August 28, 2024 11:24
find the largest classnames in Spring libraries. Also find FactoryFactories
/**
* Find the longest class names in Spring.
* Also find FactoryFactory classes.
* a goof-off project by @thom_nic
*/
import java.util.jar.*
defaultTasks 'longest', 'factoryfactory'
@inetbiz
inetbiz / lighttpd-hsts.conf
Last active August 8, 2019 21:40
Lighttpd HSTS Configuration
server.modules += ( "mod_setenv" )
$HTTP["scheme"] == "https" {
setenv.add-response-header = ("Strict-Transport-Security" => "max-age=31536000; includeSubDomains; preload")
}
@fourohfour
fourohfour / gist:8243657
Created January 3, 2014 18:38
Get nearest player Bukkit.
double closest = Double.MAX_VALUE;
Player closestp = null;
for(Player i : Bukkit.getOnlinePlayers()){
double dist = i.getLocation().distance(event.getPlayer().getLocation());
if (closest == Double.MAX_VALUE || dist < closest){
closest = dist;
closestp = i;
}
}
if (closestp == null){
@klausbrunner
klausbrunner / Unzipper.java
Last active September 2, 2018 14:00
Extracts files and directories of a standard zip file to a destination directory. Requires at least Java 7.
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import static java.nio.file.Files.*;
/**
* Extracts files and directories of a standard zip file to a destination directory. Requires at least Java 7.
*/
@aras-p
aras-p / preprocessor_fun.h
Last active April 7, 2025 13:38
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@aadnk
aadnk / LightSourceEx.java
Created June 22, 2013 18:17
LightSource Advanced - Update nearby chunks as well, but only if necessary.
package com.comphenix.example;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import net.minecraft.server.v1_5_R3.Entity;
import net.minecraft.server.v1_5_R3.EntityHuman;
import net.minecraft.server.v1_5_R3.EnumSkyBlock;
import net.minecraft.server.v1_5_R3.IWorldAccess;
@jewelsea
jewelsea / Calc.java
Last active September 9, 2024 02:36
A simple JavaFX calculator
import javafx.application.Application;
import javafx.beans.binding.Bindings;
import javafx.beans.property.*;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.*;
import javafx.stage.*;
@x2q
x2q / vereq.xml
Created November 20, 2012 08:09
Visa 3D Secure VEReq/VERes Examples
<?xml version="1.0" encoding="UTF-8"?>
<ThreeDSecure>
<Message id="999">
<VEReq>
<version>1.0.2</version>
<pan>4444333322221111</pan>
<Merchant>
<acqBIN>411111</acqBIN>
<merID>99000001</merID>
<password>99000001</password>