Skip to content

Instantly share code, notes, and snippets.

View bric3's full-sized avatar
💭
🤨

Brice Dutheil bric3

💭
🤨
View GitHub Profile
@bric3
bric3 / codebreaker.md
Last active November 1, 2015 13:52
recruitment tests

Codebreaker

Implement a simple program that match the requirements below.

The game

Code breaking is all about finding the secret code.

When the game starts the player should be able to guess the secret code by providing a 4 digits number. The game finishes when the player have found the exact match for the secret code.

@danieleggert
danieleggert / GPG and git on macOS.md
Last active July 25, 2025 23:22
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@nikhiljha
nikhiljha / AddCookiesInterceptor.java
Created July 29, 2016 04:35
Retrofit2/OkHttp3 Cookies (Drag and Drop, One Size Fits 99%)
// Original written by tsuharesu
// Adapted to create a "drop it in and watch it work" approach by Nikhil Jha.
// Just add your package statement and drop it in the folder with all your other classes.
import android.content.Context;
import android.preference.PreferenceManager;
import android.util.Log;
import java.io.IOException;
import java.util.HashSet;
@raphw
raphw / WeakeningAgent.java
Last active January 23, 2021 11:40
A Java agent for fixing exports for an app that is not yet Java 9 aware.
import java.lang.instrument.Instrumentation;
import java.lang.reflect.Layer;
import java.lang.reflect.Module;
import java.util.*;
public class WeakeningAgent {
public static void premain(String argument, Instrumentation instrumentation) {
boolean full = argument != null && argument.equals("full");
Set<Module> importing = new HashSet<>(), exporting = new HashSet<>();
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active August 26, 2025 06:42
Hyperlinks in Terminal Emulators
@jchandra74
jchandra74 / openssl.MD
Last active March 17, 2025 15:25
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

@samgooi4189
samgooi4189 / synology-transmission-note.txt
Last active April 27, 2025 09:28
Synology transmission change username and password
It is imperitive that you need to change 2 files in order to prevent transmission to overwrite your changes.
The default credential is admin:admin
1. SSH into your synology
2. edit /var/packages/transmission/target/var/settings.json to change the username and password
3. edit /var/packages/transmission/var/settings.json to change the username and password
To understand how the username and password get inserted into the settings.json, you can read /var/packages/transmission/scripts/service-setup
@bric3
bric3 / develop-jmc-ij.md
Last active March 20, 2022 23:50
Develop JDK Mission Control within IntelliJ

Opening in IJ

JMC with IntelliJ

At this stage there’s two approach:

  • If you only need to work on the core libraries, then you only need those, and they can be imported as a maven project with some configuration
  • If you need the full blown JMC, then you need the other import approach, that is a mix of .project - .classpath and Maven projects.

Working on the on the core libraries

  1. File | Open… , then select the core folder in the JMC cloned repository,
  2. Trust the project (also tick the Trust projects in <JMC clone path> as well)