Skip to content

Instantly share code, notes, and snippets.

@elbuo8
elbuo8 / main.tf
Created February 8, 2017 22:17
Compose Blog Sample
provider "aws" {
region = "us-east-1" # feel free to adjust
}
module "vpc" {
source = "github.com/segmentio/stack//vpc"
name = "my-test-vpc"
environment = "staging"
cidr = "10.30.0.0/16"
internal_subnets = ["10.30.0.0/24"]
@elbuo8
elbuo8 / sg.js
Created January 11, 2015 17:37
Parse sending
var sendgrid = require('sendgrid');
sendgrid.initialize('SENDGRID-USERNAME', 'SENDGRID-PASSOWORD');
var email = sendgrid.Email();
email.addTo('john@email.com');
email.setFrom('doe@email.com');
email.setSubject('Hello!');
email.setText('YAY');
email.addFilter("templates", "enabled", "1");
email.addFilter("templates", "template_id","the_code_of_the_needed_template");

Keybase proof

I hereby claim:

  • I am elbuo8 on github.
  • I am elbuo8 (https://keybase.io/elbuo8) on keybase.
  • I have a public key ASDzjvkerEfqiRzSCaW1lg809V9sK439TwCnyksXeWgvZAo

To claim this, I am signing this object:

@elbuo8
elbuo8 / deploy.sh
Created October 27, 2016 03:37
zeit deployment
$ cd your/app
$ now deploy -t $ZEIT_TOKEN --docker
$ DEPLOYMENT_INFO=$(curl -H "Authorization: Bearer $ZEIT_TOKEN" https://api.zeit.co/now/deployments | json -c "console.log(JSON.stringify(this.deployments.filter((e) => {return e.name === 'NAME OF YOUR APP'}).reduce((a, b) => {return a.created > b.created ? a : b})))")
$ echo "running simple check"
$ curl -i -L $(echo $DEPLOYMENT_INFO | json url)
$ now alias $(echo $DEPLOYMENT_INFO | json uid) YOURDOMAIN.com -t $ZEIT_TOKEN
@elbuo8
elbuo8 / app.js
Created January 28, 2014 01:32
Blog Part II
angular.module('tutorial', ['ionic', 'ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'partials/player.html',
controller: 'PlayerCtrl'
});
}])
.service('Playlist', ['$http', '$q', function ($http, $q) {
return {get: function (params) {
@elbuo8
elbuo8 / app.js
Created January 20, 2014 02:36
Mobile App Blog
angular.module('tutorial', ['ionic', 'ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'templates/player.html',
controller: 'PlayerCtrl'
});
}])
.service('Playlist', ['$http', '$q', function ($http, $q) {
return {get: function (params) {
$routeProvider.when('/home', {
templateUrl: 'templates/player.html',
controller: 'PlayerCtrl'
});
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/sendgrid/sendgrid-go"
"log"
"net/http"
angular.module('HypeM', ['ionic', 'ngResource', 'ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'partials/player.html',
controller: 'PlayerCtrl'
}).
when('/latest', {
templateUrl: 'partials/player.html',
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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