Skip to content

Instantly share code, notes, and snippets.

View camilosampedro's full-sized avatar
🗼

Camilo Sampedro camilosampedro

🗼
  • Tokyo, Japan
  • 04:16 (UTC -05:00)
View GitHub Profile
@camilosampedro
camilosampedro / Install Aton prerequisites.sh
Last active November 7, 2016 18:52
Installs Java 8, Activator and MySQL on Ubuntu 16.04 LTS
#!/bin/bash
# Variables
activator_version="1.3.12"
mysql_password="atonmysqldb"
# Install java
echo " => Installing Java 8"
echo " ==> Adding webupd8team/java repository"
sudo add-apt-repository ppa:webupd8team/java
echo " ==> Updating with the added repository"
@ahmetb
ahmetb / gcrgc.sh
Last active February 26, 2024 09:14
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@sinmetal
sinmetal / export.go
Created November 27, 2017 02:32
Google Cloud Datastore Export Handler
package datastorebackup
import (
"fmt"
"net/http"
"time"
"google.golang.org/appengine"
"google.golang.org/appengine/log"
"google.golang.org/appengine/user"
@arvind-iyer
arvind-iyer / .vimrc
Last active September 27, 2018 05:40
set nocompatible
filetype off
syntax on
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'nvie/vim-flake8'
@robmathers
robmathers / groupBy.js
Created October 25, 2018 23:18
A more readable and annotated version of the Javascript groupBy from Ceasar Bautista (https://stackoverflow.com/a/34890276/1376063)
var groupBy = function(data, key) { // `data` is an array of objects, `key` is the key (or property accessor) to group by
// reduce runs this anonymous function on each element of `data` (the `item` parameter,
// returning the `storage` parameter at the end
return data.reduce(function(storage, item) {
// get the first instance of the key by which we're grouping
var group = item[key];
// set `storage` for this instance of group to the outer scope (if not empty) or initialize it
storage[group] = storage[group] || [];