Skip to content

Instantly share code, notes, and snippets.

View slachiewicz's full-sized avatar

Sylwester Lachiewicz slachiewicz

View GitHub Profile
@pupapaik
pupapaik / dbench-10g-glusterfs.log
Last active August 30, 2021 08:43
dbench test cases
Working dir: /data
Testing Read IOPS...
read_iops: (g=0): rw=randread, bs=4096B-4096B,4096B-4096B,4096B-4096B, ioengine=libaio, iodepth=64
fio-2.17-45-g06cb
Starting 1 process
read_iops: Laying out IO file(s) (1 file(s) / 2048MiB)
read_iops: (groupid=0, jobs=1): err= 0: pid=8: Tue Jan 29 19:00:26 2019
read: IOPS=2124, BW=8513KiB/s (8718kB/s)(125MiB/15027msec)
@mackwage
mackwage / windows_hardening.cmd
Last active October 21, 2025 07:12
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@huksley
huksley / docker-compose.yml
Last active August 31, 2018 17:04
Launches fully configured Graylog 2.3.1 instance
#
# Launches configured Graylog 2.3.1 instance
#
# - Docker-compose 1.16 required
# - Please configure following according to your network:
# * gelf-address URL (for each container)
# * GRAYLOG_WEB_ENDPOINT_URI
# - After launch define GELF tcp and GELF udp inputs in graylog web ui
# - Containers send logging to the graylog itself
# - By default tuned to 30 days retention
@alexellis
alexellis / README.md
Last active September 5, 2017 19:58
IPCONFIG.exe as a function
@mattheworiordan
mattheworiordan / offer.md
Last active November 26, 2018 14:47
Recommend a distributed system engineer we employ and earn yourself $3,000

Unfortunately we're finding it really hard to find good distributed systems engineers at Ably, a distributed realtime data delivery platform.

We know a lot of you out there probably know great people who love solving truly hard distributed problems with a distributed team of superb engineers.

If you know anyone who fits the bill, wants to work remotely and is based in Europe (or wants to work on-site in London), we'll give you $3,000 simply for the referral if we end up employing them.

Follow these steps to earn $3,000 for one minute of your time:

  1. Contact the people you think are suitable for our Distributed Systems Engineer role and tell them to apply on that page
  2. Email us at [email protected] with the name or
@jaysridhar
jaysridhar / CSV.java
Last active March 1, 2023 16:17
Java CSV Reader module. Drop into any project and use. Supports Excel compatible CSV (multi-line columns, etc).
package sample;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.BufferedReader;
import java.util.List;
import java.util.ArrayList;
@andreldm
andreldm / AprConfiguration.java
Created February 1, 2017 12:24
APR on Spring Boot
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.core.AprLifecycleListener;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* NOTE: You also need to install APR on your system, on Arch Linux the package is called `tomcat-native`.
@Lupus
Lupus / jira_oauth.go
Last active February 20, 2023 11:44
Example of using OAuth authentication with JIRA in Go
/*
To the extent possible under law, Konstantin Olkhovskiy has waived
all copyright and related or neighboring rights to this snippet.
CC0 license: http://creativecommons.org/publicdomain/zero/1.0/
*/
package main
import (
"crypto/x509"
anonymous
anonymous / psx.py
Created November 13, 2016 14:32
PowerShell decoder by @JohnLaTwC
## hacked together by @JohnLaTwC, Nov 2016, v 0.5
## This script attempts to decode common PowerShell encoded scripts. This version handles:
## * base64 data which encode unicode, gzip, or deflate encoded strings
## * it can operate on a file or stdin
## * it can run recursively in the event of multiple layers
## With apologies to @Lee_Holmes for using Python instead of PowerShell
##
import sys
import zlib
import re
@alexellis
alexellis / Dockerfile.msbuild
Last active March 14, 2023 16:25
Dockerfile for MSBuild / ASP.NET
# Customize / optimize as necessary.
# This could probably change to plain Windows Server Core as a base-image.
FROM microsoft/iis:10.0.14393.206
SHELL ["powershell"]
RUN Invoke-WebRequest "https://download.microsoft.com/download/9/B/B/9BB1309E-1A8F-4A47-A6C5-ECF76672A3B3/BuildTools_Full.exe" -OutFile "$env:TEMP\net.exe" -UseBasicParsing
RUN & "$env:TEMP\net.exe" /Silent /Full
RUN Install-WindowsFeature NET-Framework-45-ASPNET ; \