Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

David DavidBernal

🏠
Working from home
View GitHub Profile
View change-author-commits.sh
#!/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"
@DavidBernal
DavidBernal / streaming.go
Created Nov 30, 2017 — forked from sgade/streaming.go
Golang Streaming Server
View streaming.go
package main
import (
"fmt"
"net/http"
"sync"
"time"
)
func main() {
View Emitter.js
var Emitter = {
events: [],
emit(eventName, ...args){
this.events.forEach(function(event){
if(event.name == eventName){
event.cb.apply(null, args)
}
})
},
on(eventName, cb){
View ellipsis.css
.truncate{
white-space: nowrap;
display: block;
text-overflow: ellipsis;
overflow: hidden;
}