Skip to content

Instantly share code, notes, and snippets.

View zapidan's full-sized avatar

Daniela Zapata Riesco zapidan

  • M1 Finance
  • Chicago, Illinois
View GitHub Profile
@zapidan
zapidan / resume.json
Last active October 30, 2024 21:35
registry.jsonresume.org/zapidan
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"theme": "macchiato"
},
"basics": {
"name": "Richard Hendriks",
"label": "Programmer",
"email": "[email protected]",
"phone": "(912) 555-4321",
@zapidan
zapidan / scala-enums.scala
Created January 14, 2018 19:31
scala enums
import Test.{doWhat, findColorById, findColorById2, findColorByName}
import TrafficLightColorById.{Green, Red, TrafficLightColorById, Yellow}
import scala.util.Try
/*
Enums (id, name) with default id incremental
*/
object TrafficLightColor extends Enumeration {
val Red = Value(0, "RED")
@zapidan
zapidan / server.js
Created November 6, 2015 17:00
Simple Express Server that serves files on /public folder
var path = require('path');
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.set('port', (process.env.PORT || 3000));
app.use('/', express.static(path.join(__dirname, 'public')));
app.use(bodyParser.json());
@zapidan
zapidan / git-change-author
Last active September 18, 2024 06:47
Change previous commits author/email with filter-branch
## Make sure your local repo settings are correct
git config --local --list
git config --local user.name "author name"
git config --local user.email "[email protected]"
## Change previous n commits
git rebase -i HEAD~n
# choose the commits to change by adding 'pick' or 'reword' (only for changing the message)
git commit --amend --author="Author Name <[email protected]>"
# change first commit in repo
@zapidan
zapidan / gist:14ca24cfc36716ba5699
Created July 10, 2015 14:37
Fix NPM/Node installation issues
sudo brew uninstall node
brew update
brew upgrade
brew cleanup
brew install node
sudo chown -R $(whoami) /usr/local
brew link --overwrite node
sudo brew postinstall node