Skip to content

Instantly share code, notes, and snippets.

View DavidBernal's full-sized avatar
🏠
Working from home

David DavidBernal

🏠
Working from home
  • Barcelona
View GitHub Profile
.truncate{
white-space: nowrap;
display: block;
text-overflow: ellipsis;
overflow: hidden;
}
var Emitter = {
events: [],
emit(eventName, ...args){
this.events.forEach(function(event){
if(event.name == eventName){
event.cb.apply(null, args)
}
})
},
on(eventName, cb){
@DavidBernal
DavidBernal / streaming.go
Created November 30, 2017 22:59 — forked from sgade/streaming.go
Golang Streaming Server
package main
import (
"fmt"
"net/http"
"sync"
"time"
)
func main() {
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"