Skip to content

Instantly share code, notes, and snippets.

View JKetelaar's full-sized avatar
Loading...

Jeroen Ketelaar JKetelaar

Loading...
View GitHub Profile
@bubba-h57
bubba-h57 / instructions.md
Last active July 5, 2024 10:14
Configuring Jetbrains Gateway and WSL

Step 1: SSH Daemon

In your WSL instance, re-install OpenSSH server as follows.

sudo apt remove --purge openssh-server
sudo apt install openssh-server

Edit /etc/ssh/sshd_config (e.g. sudo vi /etc/ssh/sshd_config) and add the following lines to the bottom of the file. Ensure you replace WSL_ACCOUNT_NAME with your WSL2 account name.

@anderly
anderly / CacheService.cs
Last active July 24, 2024 10:02
MediatR Caching Pipeline Behavior
public class CacheService : ICache
{
private readonly string _keyPrefix;
private readonly IDistributedCache _cache;
private readonly IConfiguration _config;
public CacheService(IDistributedCache cache, IConfiguration config)
{
_cache = cache;
_config = config;
@leek
leek / _Magento2_DeleteTestData.md
Last active July 16, 2024 20:20
Magento 2 - Delete All Test Data

These set of scripts are for Magento 2. For Magento 1, see this Gist.

@gmolveau
gmolveau / docker_sqlmap_tor_proxy.md
Last active December 30, 2020 11:34
[SQLMap using Tor Proxy via Docker] a guide to launch a sqlmap docker using a docker proxy #docker #sqlmap #tor
  • First run the Tor proxy docker :
docker run -d --restart always -v /etc/localtime:/etc/localtime:ro -p 127.0.0.1:9050:9050 --name torproxy jess/tor-proxy
  • Then launch your sqlmap docker :
docker run -it --link torproxy:torproxy --rm -v $PWD/sqlmapdata:/home/sqlmap/.sqlmap:rw ilyaglow/sqlmap --proxy socks5://torproxy:9050 --check-tor --random-agent -u "example.com"
@danieldietrich
danieldietrich / FastestMachineContest.java
Last active September 20, 2017 19:01
Who has the fastest machine? 😄
import io.vavr.collection.Iterator;
import io.vavr.collection.Seq;
public class Test {
public static void main(String[] args) {
int size = 10;
Iterator<String> iter = Iterator.continually(() -> (char) (Math.random() * ((122 - 48) + 1) + 48))
@olssonm
olssonm / macos-disable-resize
Last active June 8, 2024 18:02
Disable resizing of the macOS dock
defaults write com.apple.dock size-immutable -bool true; killall Dock
@ProxiBlue
ProxiBlue / gist:dfc74f35721b57e96b560d898cb6bfeb
Last active May 5, 2017 13:41
a script i run on any db to make it local dev ready
#!/bin/bash
n98-magerun --scope-id=0 config:set web/unsecure/base_url {{base_url}}
n98-magerun --scope-id=0 config:set web/secure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/unsecure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/secure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/unsecure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=1 --scope="stores" config:set web/secure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=0 config:set web/unsecure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=0 config:set web/secure/base_skin_url {{base_url}}/skin
@JKetelaar
JKetelaar / Test.java
Created June 16, 2016 18:14
Managing the OSRune loader and cracking their insane method to secure downloading their actual client
import com.osrune.Loader;
import com.osrune.b;
import com.osrune.c;
import com.osrune.f;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@JayWood
JayWood / wpcli-posts-generator.php
Created May 6, 2016 14:14
A robust random posts generator with support for multisite, taxonomies, term counts, post counts, post types, featured images, featured image types, and more.
<?php
if ( defined( 'WP_CLI' ) && WP_CLI ) {
class JW_Random_Posts extends WP_CLI_Command {
private $args, $assoc_args;
/**
* Generates a Random set of posts
*
@subfuzion
subfuzion / curl.md
Last active July 18, 2024 17:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.