Skip to content

Instantly share code, notes, and snippets.

View williambsb's full-sized avatar
🎯
Focusing

William Alencar williambsb

🎯
Focusing
  • GoodFy Labs
  • Brasília
View GitHub Profile
@branneman
branneman / better-nodejs-require-paths.md
Last active June 29, 2024 16:00
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@jeffThompson
jeffThompson / UploadDataOverWifi.ino
Last active February 9, 2023 16:27
How to upload data to a server with Arduino
#include <SPI.h>
#include <WiFi101.h>
/*
UPLOAD DATA OVER WIFI
Jeff Thompson | 2017 | jeffreythompson.org
The great Arduino Wifi101 library includes lots of examples
of how to *get* data from the internet, but no examples on how
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 24, 2024 08:58
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@HelioCampos
HelioCampos / database_migration_best_practices.md
Created September 28, 2017 14:00
Database migration best practices for Rails

Database migration best practices for Rails

Never ever change data on schema changes! [1]

Use rake tasks to change the data! [1]

This decouples a deployment from completed migrations. Give us control of the data manipulation proccess by encapsulatin it in on place. need to remember to:

  1. Run it in one of the ways bellow: a. Add this rake task the deployment script or;
@MimiOnuoha
MimiOnuoha / earthquake_markers.html
Last active December 15, 2021 04:10
Mapbox GL JS example with custom markers and popups
<!-- Documentation: https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson -->
<!-- Mapbox styles: https://github.com/mapbox/mapbox-gl-styles -->
<!-- Earthquake data: https://earthquake.usgs.gov/ -->
<!DOCTYPE html>
<html lang="es">
<head>
<style>
body {
margin: 0;