Skip to content

Instantly share code, notes, and snippets.

@roscopecoltran
roscopecoltran / vgoget.sh
Created October 23, 2018 19:16 — forked from rogpeppe/vgoget.sh
go get binary@version
#!/bin/sh
# This command installs binaries at specified versions
# into $GOBIN, $GOPATH/bin or $HOME/bin.
# It assumes Go 1.11.
if [ $# = 0 ]; then
usage: vgoget cmdpackage[@version]... >&2
exit 2
fi
d=`mktemp -d`
cd "$d"
@roscopecoltran
roscopecoltran / main.go
Created October 14, 2018 02:17 — forked from egonelbre/main.go
Vecty bugs
package main
import (
"encoding/hex"
"fmt"
"math/rand"
"github.com/gopherjs/vecty"
"github.com/gopherjs/vecty/elem"
"github.com/gopherjs/vecty/event"
@roscopecoltran
roscopecoltran / angular_cheat_sheet.md
Created September 15, 2018 07:30
Angular-Cheat-Sheet

Angular.js basic concepts cheat sheet

What is the Scope ?

  • An execution context for expressions
  • An object which is a reference to the application model
  • It binds the view to the controller
  • Instanciated by the $rootScope
  • Scopes are arranged in hierarchical structure which mimic the DOM structure of the application
  • Scopes can watch expressions and propagate events.
  • It has the methods: $on, $emit, $broadcast, $apply, $applyAsync, $digest, $destroy,
@roscopecoltran
roscopecoltran / handler.go
Created September 2, 2018 14:41 — forked from wreulicke/handler.go
AWS Lambdaでリポジトリの内容を書き換えるサンプル
package main
import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"time"
@roscopecoltran
roscopecoltran / gist:e1bfed8171df62b53541b885a531409e
Created September 1, 2018 07:18 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@roscopecoltran
roscopecoltran / 1README.md
Created August 29, 2018 17:08 — forked from jkachmar/1README.md
Small Docker images with Alpine, Haskell, and Stack

All actions should be performed in the root directory of a Haskell project that uses stack. The following lines should be present in the project's stack.yaml file:

docker:
  enable: true

Additionally, the BaseImage and Dockerfile files from this gist should also be present in the project's root directory.

@roscopecoltran
roscopecoltran / gist:f606a5e265590389a6426e936d2653a7
Created August 25, 2018 11:20 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@roscopecoltran
roscopecoltran / clean-docker-for-mac.sh
Created August 7, 2018 07:21 — forked from MrTrustor/clean-docker-for-mac.sh
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
package main
import (
"bufio"
"log"
"os"
)
var concurrency = 100
@roscopecoltran
roscopecoltran / stack.yml
Created August 2, 2018 12:51 — forked from smebberson/stack.yml
Koding stack
# Here is your stack preview
# You can make advanced changes like modifying your VM,
# installing packages, and running shell commands.
provider:
digitalocean:
access_token: '${var.digitalocean_access_token}'
resource:
digitalocean_droplet: