Skip to content

Instantly share code, notes, and snippets.

View sanderploegsma's full-sized avatar
💭
I may be slow to respond.

Sander Ploegsma sanderploegsma

💭
I may be slow to respond.
View GitHub Profile
@ezfe
ezfe / 1.18.2-arm64.json
Last active October 19, 2022 14:18
1.18.2 on Apple M1
{"id":"1.18.2-arm64","assets":"1.18","javaVersion":{"component":"java-runtime-beta","majorVersion":17},"time":"2022-04-28T02:59:52Z","downloads":{"clientMappings":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/a661c6a55a0600bd391bdbbd6827654c05b2109c\/client.txt","size":6716693,"sha1":"a661c6a55a0600bd391bdbbd6827654c05b2109c"},"client":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/2e9a3e3107cca00d6bc9c97bf7d149cae163ef21\/client.jar","size":20259661,"sha1":"2e9a3e3107cca00d6bc9c97bf7d149cae163ef21"},"server":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/c8f83c5655308435b3dcf03c06d9fe8740a77469\/server.jar","size":46592587,"sha1":"c8f83c5655308435b3dcf03c06d9fe8740a77469"},"serverMappings":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/e562f588fea155d96291267465dc3323bfe1551b\/server.txt","size":5212964,"sha1":"e562f588fea155d96291267465dc3323bfe1551b"}},"type":"release","libraries":[{"name":"com.mojang:logging:1.0.0","downloads":{"artifact":{"path":"com\/mojang\/logging\/1.0.0\/logging-
@allquixotic
allquixotic / README.md
Last active December 11, 2022 02:33
High Quality Pitch Shifting for Spotify on Windows using MSYS-MinGW64

The goal of this exercise is to get pitch shifting (changing the pitch of music up or down) working with Spotify on Windows 10 using native-compiled open source software. This solution does not require any VMs or Linux at all.

For this solution, the actual sound playback will be occurring on your Windows PC using your soundcard, but there are other components of the solution that do some audio processing. I'll explain each.

Requirements

  1. A Spotify Premium account
  2. The 64-bit build of MSYS2 from https://www.msys2.org/ -- get the default installer and install with default options.

Overview of the Working Solution

@alexishida
alexishida / nginx-config-auth-cert-ssl.md
Last active July 1, 2024 14:17
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
@skyrocknroll
skyrocknroll / locustfile.py
Created April 3, 2017 14:01
locust redis load testing
import time
import redis
from locust import Locust, events
from locust.core import TaskSet, task
class RedisClient(object):
def __init__(self, host="localhost", port=6379):
self.rc = redis.StrictRedis(host=host, port=port)
@wojteklu
wojteklu / clean_code.md
Last active September 25, 2024 12:06
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@eschwartz
eschwartz / Dockerfile
Last active November 2, 2023 15:11
npm install from private repo, in docker build
# Add these lines to your dockerfile, before `npm install`
# Copy the bitbucket private key to your docker image
COPY ./bitbucket_ssh_key /opt/my-app
# Copy the ssh script to your docker image
COPY ./ssh-bitbucket.sh /opt/my-app
# Tell git to use your `ssh-bitbucket.sh` script
ENV GIT_SSH="/opt/map-project-tile-server/ssh-bitbucket.sh"
@boennemann
boennemann / README.md
Last active August 26, 2024 07:42
Pushing new releases of a legacy version with semantic-release

If you have a package where a lot of people are still using a legacy version of it you might want to keep pushing (security-)fixes to that "branch".

Let's say the "latest" version of your package is "5.4.0", but there is as significant amount of people still using "4.7.4" – the last version you released before doing "5.0.0".

You found a critical bug in "5.4.0" and push it as out as "5.4.1", but it applies to "4.7.4" as well and so you want to do "4.7.5".

Assuming you have semantic-release already set up, you can follow these steps to get that "4.7.5" legacy support release out.

  1. Go to the relevant commit: git checkout v4.7.4
  2. Create a new branch from it: git checkout -b 4.x (You can choose any branch name, just make sure to use the same in step 3)
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@snim2
snim2 / .travis.yml
Last active August 31, 2023 20:03
Travis-CI recipe for testing LaTeX projects compiled by a Makefile
install:
- sudo apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- sudo apt-get install chktex
script:
- make
- chktex -W # Print version information.
- chktex -q -n 6 *.tex chapters.*.tex 2>/dev/null | tee lint.out
# If lint output is non-empty report an error.
- test ! -s lint.out