Skip to content

Instantly share code, notes, and snippets.

View jprivillaso's full-sized avatar
🌏
Writing scalable bits

Juan Rivillas jprivillaso

🌏
Writing scalable bits
View GitHub Profile
@iagocaldeira
iagocaldeira / Dockerfile
Created April 18, 2019 18:35
Dockerfile com JDK(+javac), Node, Gradle, Android SDK e Cordova para geração das builds do Android e iOS
# LABEL maintainer="Iago Caldeira <iagocaldeiraa@gmail.com>"
FROM openjdk:8u201-jdk-alpine3.9 as openjdk
# Link javac installation
RUN ln -s /usr/lib/jvm/java-1.8-openjdk/bin/javac /usr/bin/javac
# Node Installation
RUN apk add nodejs-current-npm bash && rm -rf /var/cache/apk/*
# ENV NPM_CONFIG_PREFIX=/home/node/.npm-global \
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active November 28, 2025 14:24
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@fourcolors
fourcolors / .babelrc
Created June 15, 2017 20:08
Example for create react native app with alias
{
"presets": ["babel-preset-expo"],
"env": {
"development": {
"plugins":
["transform-react-jsx-source",
["module-resolver",{
"root": ["./src"],
"alias": {
"screens": "./screens"
@mpneuried
mpneuried / Makefile
Last active August 29, 2025 08:17
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
// Generated on 2014-11-18 using generator-angular-fullstack 2.0.13
'use strict';
module.exports = function (grunt) {
// Load grunt tasks automatically, when needed
require('jit-grunt')(grunt, {
express: 'grunt-express-server',
useminPrepare: 'grunt-usemin',
ngtemplates: 'grunt-angular-templates',
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@mbostock
mbostock / .block
Last active February 9, 2016 02:03 — forked from mbostock/.block
Projected Choropleth
license: gpl-3.0
@founddrama
founddrama / moment-in-node.js
Created March 24, 2012 12:53
Moment.js examples
// node:
var moment = require('moment');
moment().add('days', 2).fromNow();
// 'in 2 days'
moment().subtract('days', 2).fromNow();
// '2 days ago'
moment('November 1977').fromNow()