Skip to content

Instantly share code, notes, and snippets.

View seveibar's full-sized avatar
💭
twitter dms or mentions to get my attenion!

Severin Ibarluzea seveibar

💭
twitter dms or mentions to get my attenion!
View GitHub Profile
const dictionary = {
word1List: [
"afraid",
"ancient",
"angry",
"average",
"bad",
"big",
"bitter",
"black",
@jackblk
jackblk / LogitechF310_Macbook.MD
Created April 13, 2021 16:07
Getting Logitech F310 to work with Macbook USB-C port

Connect & use Logitech F310 with Macbook

Since my Macbook Pro only has USB-C port, I used an USB-A to USB-C adapter to connect my F310 to it, but it does not work (pressing MODE button does not turn on the LED).

How to

To make it work:

  • Disconnect F310 from Mac
  • On F310: switch X-input to D-input
  • Hold Logitech button (in the middle)
  • Connect F310 to Mac via adapter, now you can release the Logitech button.
@zmts
zmts / knex_ssl.md
Last active September 3, 2023 23:21
Can't connect to PostgreSQL. SSL error with Nodejs/Knexjs (Digital ocean)

Can't connect to PostgreSQL. SSL error with Nodejs/Knexjs (Digital ocean)

Issues:

Case 1

{
  client: 'pg',
  connection: {
    host: process.env.DB_HOST,
    port: process.env.DB_PORT,
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
@tenderlove
tenderlove / z-wave-uart.md
Created February 4, 2018 00:41
Aeotec Z-Wave Z-Stick Gen 5 UART protocol

Z-Stick Serial API

The Z-Stick does bi-directional communication over a UART. The connection speed is 115200, '8N1'. There are "requests" and "responses". The client software can make requests to the Z-Stick, and it will send responses. But it seems the Z-Stick can make requests of the client software too. I have yet to figure out the requests the Z-Stick sends to the client software.

Packets

@cjxgm
cjxgm / rust-wasm-archlinux.md
Last active February 23, 2021 05:21
Rust + WebAssembly Guide, on Arch Linux

Rust + WebAssembly Guide, on Arch Linux

Motivation

It's just too complex to make Rust+WASM work on macOS, but all the other guides online target macOS. This guide targets only Arch Linux. If your favorate distro is great, you should be able to do the same thing.

Setup

Install rustup and emscripten with the distro's native package manager.

@iamcaleberic
iamcaleberic / pulse.md
Last active November 26, 2023 05:43
Enabling Pulse Audio Equaliser Arch Linux

Enabling Pulse Audio Equaliser Arch Linux

  • Install the pulseaudio package.

     $ pacman -S pulseaudio
    
  • Install control module and equlizer

     $ pacman -S pulseaudio-equalizer pavucontrol
    
  • Install gst-plugins-good if your intended program has a legacy GStreamer implementation.

@fsargent
fsargent / auth0-kong.md
Last active February 17, 2024 15:07
JWT Validation with Auth0 and Kong

To get setup with Auth0 and Kong.

Kong is pretty cool. Auth0 is pretty cool. They should work together. This guide details the fastest way to get your APIs protected using JWT tokens issued by Auth0.

Pre-requisites:

  • Create a Auth0 account. Account name is referred to "COMPANYNAME" for the sake of the guide.
  • Setup a Kong instance on your machine. This guide assumes a brand new blank instance.
  • Install httpie - a http command line utility built for humans (unlike curl).
@seveibar
seveibar / serial-resolve.js
Created April 14, 2017 23:37
Resolve promises serially, with a given number in parallel
// @flow
export const serialResolve = (functionsReturningPromises: Array<() => Promise<any>>, parallelTasks: number) => new Promise((resolve, reject) => {
let tasksStarted = 0;
// Create empty results array
const results = Array.from(functionsReturningPromises, () => null);
const totalFunctions = functionsReturningPromises.length;
// When a promise completes, set the correct results index and start any additional tasks
let completedPromises = 0;
@alex-bender
alex-bender / get_image_manifest.sh
Last active April 1, 2021 14:17
Docker Registry v2 get manifest and push\pull
#!/bin/bash
#
# Shell scripts for get image manifest from v2 registry
#
# Tested on Debian 8, curl 7.38.0, jq-1.5
#
set -e -u
# Default tag is latest