Skip to content

Instantly share code, notes, and snippets.

@jack126guy
jack126guy / electribe-sampler-e2ssample-format.md
Last active March 24, 2023 17:13
Partial format specification for the e2sSample.all file used by the Korg Electribe Sampler

Electribe Sampler e2sSample.all Data Format

Based on examination of the source code for e2sEdit and Oe2sSLE.

Overview

The file is just a concatenation of WAVE files with a header to indicate where each file begins. Additional metadata such as sample name and loop point are stored in each WAVE file as a RIFF chunk with type "korg", which is conventionally at the end of the file.

Unless otherwise specified, all integers are little-endian unsigned.

@ijin82
ijin82 / http-proxy-auth.go
Last active May 14, 2024 09:21
Simple HTTP proxy with authorization on golang
package main
import (
"github.com/elazarl/goproxy"
"github.com/elazarl/goproxy/ext/auth"
"log"
"net/http"
"flag"
)
@dgomesbr
dgomesbr / RedisLoaderApplication.java
Last active July 6, 2018 12:19
Redis Pipeline: spring-data-redis vs simple jedis
import com.lambdaworks.redis.RedisAsyncConnection;
import com.lambdaworks.redis.RedisClient;
import com.lambdaworks.redis.SetArgs;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
@brandur
brandur / go-pipelines.md
Last active April 15, 2024 15:48
Go Pipelines

Go Pipelines

This document demonstrates a basic pipeline in Go and talks about a risk in in implementing them. Keep in mind that:

  • Using FizzBuzz here is contrived, but quite a nice way to demonstrate the concept. Obviously there is no advantage to running the basic workload of FizzBuzz in a Goroutine, but if the task involved heavy computation or long lived I/O, it starts to make a lot more sense.
  • The problem discussed only applies to Goroutines that actually need to have a way to
@agrison
agrison / RedisMassInport.java
Created July 22, 2015 14:14
Simple spring boot app with Jedis inserting 1M keys in redis using pipelining and multi-threading
package me.grison.redis.foo;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import redis.clients.jedis.Jedis;
import java.io.IOException;
import org.apache.logging.log4j.core.appender.AbstractManager;
import org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy;
import org.apache.logging.log4j.core.appender.rolling.RollingFileManager;
import org.apache.logging.log4j.core.appender.rolling.RolloverDescription;
import org.apache.logging.log4j.core.appender.rolling.RolloverDescriptionImpl;
import org.apache.logging.log4j.core.appender.rolling.RolloverStrategy;
import org.apache.logging.log4j.core.appender.rolling.action.AbstractAction;
import org.apache.logging.log4j.core.appender.rolling.action.Action;
@cletusw
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@denji
denji / http-benchmark.md
Last active July 18, 2024 09:01
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@mapbutcher
mapbutcher / Postgresql-module-install
Created October 23, 2013 01:48
Notes on how to install a missing module from PostgreSQL
#Notes on how to install a missing module from PostgreSQL
#Download and Postgresql (no need to make install because we already have it..):
#pre-requisites
sudo apt-get install gcc
sudo apt-get install libreadline-dev
sudo apt-get install zlib1g-dev
wget http://ftp.postgresql.org/pub/source/v9.3.0/postgresql-9.3.0.tar.gz
@mlconnor
mlconnor / nodenotes.txt
Last active December 9, 2015 22:58
Node notes
# my node AMI - IMAGE ami-bcccb2d5
on beanstalk, you can see node logs at /var/log/nodejs/nodejs.log
on beanstalk, if you proxy via nginx, check those logs here /var/log/nginx/error.log
proper way to make a mod to a repo and grab it with npm (http://debuggable.com/posts/how-to-fork-patch-npm-modules:4e2eb9f3-e584-44be-b1a9-3db7cbdd56cb)
Fork the project on GitHub
Clone the fork to your machine
Fix the bug or add the feature you want