Skip to content

Instantly share code, notes, and snippets.

View gemmadlou's full-sized avatar

Gemma Black gemmadlou

View GitHub Profile
// > file-sync-blocking.test.mjs
import test from 'node:test';
import assert from 'node:assert';
import fs from "node:fs";
test('reading file 10,000 times with callback blocking', (t) => {
for (let i = 0; i < 10000; i++ ) {
const data = fs.readFileSync("./text.txt", { encoding: 'utf-8'})
assert.strictEqual(data, "Hello, world")
}

What Hiring Should Look Like

This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.

I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.

But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.

If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.

@jesugmz
jesugmz / solve-load-pubkey-id_rsa-invalid-format.md
Last active December 2, 2022 23:35
Solve load pubkey "/root/.ssh/id_rsa": invalid format

OpenSSH 8.3p1 introduces the need of having a public SSH key otherwise is gonna show the warning

load pubkey "/root/.ssh/id_rsa": invalid format

# ssh -V
OpenSSH_8.3p1, OpenSSL 1.1.1g  21 Apr 2020

To supress this message we can put in place our SSH public key or generate it from our private key with:

@eusonlito
eusonlito / README.md
Last active March 15, 2024 15:01
Laravel Auth and Session without database. Using a remote API as Auth and Data provider.

This is an example of a web that uses a remote API as a database wrapper.

The remote API is stateless and the web uses cookies to maintain session persistence.

The API authentication endpoint returns a TOKEN that allows the web to make each request to the API with the user authentication header.


Este es un ejemplo de web que usa una API remota como wrapper de base de datos.

@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@mkhmylife
mkhmylife / laravel-k8s-configmap.yaml
Created May 3, 2019 18:31
Laravel Kubernetes Deployment files
apiVersion: v1
kind: ConfigMap
metadata:
name: backend-config
data:
APP_DEBUG: "false"
APP_ENV: production
APP_KEY: changeme
APP_LOG_LEVEL: debug
APP_NAME: "Laravel K8s"
@sshymko
sshymko / install_mysql_client.sh
Last active March 14, 2024 20:10
Install MySQL 5.7 client on Amazon Linux 2
#!/bin/sh
sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
sudo yum install -y mysql-community-client
@timgentry
timgentry / powerbi_json_to_csv.rb
Created October 18, 2018 12:41
Converts PowerBI JSON payload to CSV
require 'json'
require 'csv'
hash = JSON.parse(File.read('querydata.json'))
CSV.open('data.csv', 'w') do |csv|
hash['results'].each do |result|
data = result['result']['data']
descriptor = data['descriptor']
dsr = data['dsr']
@DrBoolean
DrBoolean / fp_arch.js
Last active October 27, 2020 09:57
OO => FP architecture refactor
// Simple example, but the idea holds for more complex objects.
/* 1) Start with OO */
// user.js
class User {
constructor(firstName, lastName, email) {
this.firstName = firstName
this.lastName = lastName

Install MySQL

See what formula are available.

brew search mysql
==> Formulae