Skip to content

Instantly share code, notes, and snippets.

View sibelius's full-sized avatar
🦈
give me a feedback https://entria.feedback.house/sibelius

Sibelius Seraphini sibelius

🦈
give me a feedback https://entria.feedback.house/sibelius
View GitHub Profile
@stephenh
stephenh / .yarnrc.yml
Created October 23, 2023 15:40
supported architectures
# This setting ensures we always install the Linux binaries when running `yarn install`. This is needed for running
# swc natively in Docker from a Mac host.
supportedArchitectures:
cpu:
- current
- x64
- arm64
libc:
- current
- glibc
@jgcmarins
jgcmarins / decision-matrix.md
Created September 25, 2023 14:49
Looking for a new career opportunity? Use this table to create a ranking of all job offers

Table of concepts and definitions

Concept Definition
Autonomy How well will this company give me autonomy to do my job?
Freedom How much freedom will I have to balance work and personal life?
Responsibilities What level of responsibilities will I have, and how extensive will they be?
Culture How well does this company's culture align with my values, and how open is the company to allowing me to contribute to the culture I believe in?
Tech Stack How closely does the tech stack used by this company align with my preferences, and to what extent is the company willing to allow me to use the stack I prefer?
Personal Growth How big is the potential of this company to help me keep growing?
@steve981cr
steve981cr / electron-store-fix.md
Created August 30, 2023 20:17
Electron-Store interim fix to Electron Forge packaging error

Electron-Store interim fix to Electron Forge packaging error

The problem: Electron's recommended app packager is Electron Forge. My app uses electron-store to persist small amounts of data used in the main process. It works fine in development mode but for some reason when I package the app with Electron-forge it will thrown an error and crash the app.

Interim solution: My solution was to build my own super simple storage module using the same file and method names used by electron store. It is not as robust as electron-store but it was sufficient for my needs so I thought I would pass this on to anyone else running into this issue. This is not an npm package, rather you can just copy the code below to make your own local module. If you are already using electron-store you do not have to modify any of your code except for adding the relative path to your module in the require statement.


Electron-store.js

Create a file named electron

@doziestar
doziestar / docker-compose.yml
Last active August 16, 2023 14:28
tls: failed to verify certificate: x509: certificate signed by unknown authority
`docker-compose`
server:
container_name: hubhub-server
# image: '${DOCKER_USER}/hubhubserver:latest'
extra_hosts:
- host.docker.internal:host-gateway
restart: always
build:
context: .
@noghartt
noghartt / cc.md
Last active May 5, 2024 21:28
Resources to learn more about Computer Science and related stuffs
@dionisioviei
dionisioviei / gist:b7698621159eaa08833faad0c2a56ccf
Last active August 7, 2023 20:43
CSP Content tag Policy example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss:; media-src 'self' data: blob:;"
/>
@igor9silva
igor9silva / generate-thum.js
Created May 31, 2023 11:11
Generate Thumbnail on S3 upload
// dependencies
const util = require('util');
const sharp = require('sharp');
const AWS = require('aws-sdk');
// get reference to S3 client
const s3 = new AWS.S3();
exports.handler = async (event, context, callback) => {
@alexedwards
alexedwards / Makefile
Last active May 4, 2024 18:29
Boilerplate Makefile for Go projects
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@mauvieira
mauvieira / c-dsa-checklist.md
Last active April 27, 2023 21:55
c and dsa checklist

C lang

  • how to compile: GCC or Clang
  • variables, data types, arrays, structures, functions and pointers
  • operators: arithmetic, relational, logic, bitwise, etc
  • control flow structures
  • standard library

projects

  • file manager: crud with folders and files
  • text editor
@Xavier577
Xavier577 / websocket_nodejs_implementation.md
Last active April 22, 2023 16:29
Implementing a websocket server without any libraries with raw nodejs

Code snippet

import { createServer } from "http";
import crypto from "crypto";

const PORT = 8001;

// this is from the web-socket specification and not something that is generated
const WEBSOCKET_MAGIC_STRING_KEY = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";