Skip to content

Instantly share code, notes, and snippets.

@fabiolimace
fabiolimace / CombUuidCreator.java
Last active July 14, 2023 01:03
Generates COMB UUID/GUID in Java
package your.package.name;
import java.security.SecureRandom;
import java.util.Random;
import java.util.UUID;
/**
* A UUID generator that creates COMB UUIDs.
*
* The COMB UUIDs combine the creation time and random bytes.
@briandominick
briandominick / asciidoc-static.adoc
Last active March 11, 2024 18:24
Static Site Generators with AsciiDoc Support

There are 28 static site generators that support AsciiDoc sourcing.

@gecon
gecon / gist:110697309c4903bd76ad0ed658761d34
Last active April 2, 2018 23:43 — forked from moneytoo/gist:ab3f34e4fddc2110675952f8280f49c5
nginx with OpenSSL 1.0.2 (ALPN) on CentOS 6
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools pcre-devel
OPENSSL="openssl-1.0.2j"
NGINX_VERSION="1.11.5-1"
rpm -ivh http://nginx.org/packages/mainline/centos/6/SRPMS/nginx-$NGINX_VERSION.el6.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/6/SRPMS/nginx-module-geoip-$NGINX_VERSION.el6.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/6/SRPMS/nginx-module-image-filter-$NGINX_VERSION.el6.ngx.src.rpm
@astromechza
astromechza / cpueater.java
Last active January 4, 2023 09:58
Simple java program for running multi-threaded cpu stress test.
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.atomic.LongAdder;
public class Main
{
public static void main(String[] args) throws InterruptedException
{
if (args.length != 1)
@moneytoo
moneytoo / gist:ab3f34e4fddc2110675952f8280f49c5
Last active March 22, 2020 16:05
nginx with OpenSSL 1.0.2 (ALPN) on CentOS 7, also available from https://brouken.com/brouken-centos-7-repo/
### No longer needed as of nginx-1.13.6-1.el7_4.ngx.x86_64.rpm from nginx.org
### it was compiled against OpenSSL 1.0.2 from CentoOS 7.4 so it supports ALPN (HTTP2 works)
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools
OPENSSL="openssl-1.0.2l"
NGINX_VERSION="1.13.5-1"
NJS_VERSION="1.13.5.0.1.13-1"
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active May 4, 2024 15:04
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@Illvili
Illvili / html5mp3.php
Created March 3, 2015 03:44
MW mp3 resolve file url
<?php
if ( ! defined( 'MEDIAWIKI' ) )
die();
/*******************************************************************************
* *
* HTML5MP3 Extension is base on FlashMP3 *
* *
* FlashMP3 Extension by Matthias Korn to embed a flash player with mp3-files *
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES;
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama
@martyglaubitz
martyglaubitz / ActionBarTabsAtopFix.java
Last active August 29, 2015 14:02
Fix: Android Actionbar Tabs appear over ActionBar
final View homeIcon = findViewById(android.R.id.home);
((View) homeIcon.getParent()).setVisibility(View.GONE);
@aputs
aputs / replace-centos6x-iptables
Last active February 28, 2022 04:58
replace centos 6.x iptables
# compile iptables from source and install to /usr/local
mkdir -p /tmp/iptables
wget "http://www.netfilter.org/projects/iptables/files/iptables-1.4.21.tar.bz2" -qO- | tar --strip-components=1 -C /tmp/iptables -xvj
cd /tmp/iptables
./configure
make
make install
# set alternatives
sudo alternatives --install /sbin/iptables iptables.x86_64 /usr/local/sbin/iptables 100 \