Skip to content

Instantly share code, notes, and snippets.

View Angeldude's full-sized avatar

Angel Vanegas Angeldude

View GitHub Profile
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
@Angeldude
Angeldude / profiles.json
Created April 13, 2020 14:50 — forked from trajano/settings.json
Windows Terminal (with git bash and additional shortcuts)
{
"globals" :
{
"alwaysShowTabs" : true,
"copyOnSelect" : false,
"defaultProfile" : "{00000000-0000-0000-ba54-000000000001}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
@Angeldude
Angeldude / dotnetlayout.md
Created April 8, 2020 19:36 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@Angeldude
Angeldude / plpgsql.rake
Created February 18, 2019 21:30 — forked from rietta/plpgsql.rake
Are you using PostgreSQL and don't want to make your app run as PostgreSQL super user, then add this custom rake task to your `lib/tasks` folder and be happy.
#
# PostgreSQL writes two optional commands to the database schema
# file, called db/structure.sql, that can only be run as a root
# database user. These are not needed actually, so comment them
# out automatically
#
# CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
# COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
#
namespace :db do
@Angeldude
Angeldude / JavaScript Sieve Of Atkin.js
Created November 19, 2018 02:12 — forked from rizalp/JavaScript Sieve Of Atkin.js
return array of primes below limit using Sieve of Atkin Algorithm http://en.wikipedia.org/wiki/Sieve_of_Atkin #JavaScript #primes
function sieveOfAtkin(limit){
var limitSqrt = Math.sqrt(limit);
var sieve = [];
var n;
//prime start from 2, and 3
sieve[2] = true;
sieve[3] = true;
for (var x = 1; x <= limitSqrt; x++) {
@Angeldude
Angeldude / Applicative.scala
Created November 30, 2017 13:04 — forked from DanielaSfregola/Applicative.scala
tutorial-cat-solutions
package com.danielasfregola.tutorial.cat.applicative
import com.danielasfregola.tutorial.cat.functor.Functor
trait Applicative[Box[_]] extends Functor[Box] {
def pure[A](a: A): Box[A]
def ap[A, B](boxF: Box[A => B])(boxA: Box[A]): Box[B]
@Angeldude
Angeldude / ppa
Created October 26, 2017 14:26 — forked from febrianrendak/ppa
ppa
sudo apt-add-repository -y ppa:atareao/atareao
sudo apt-add-repository -y ppa:brightbox/ruby-ng
sudo apt-add-repository -y ppa:didrocks/ubuntu-developer-tools-center
sudo apt-add-repository -y ppa:git-core/ppa
sudo apt-add-repository -y ppa:gns3/ppa
sudo apt-add-repository -y ppa:hachre/dart
sudo apt-add-repository -y ppa:jerzy-kozera/zeal-ppa
sudo apt-add-repository -y ppa:jtaylor/ipython
sudo apt-add-repository -y ppa:klaus-vormweg/awesome
sudo apt-add-repository -y ppa:libreoffice/ppa
@Angeldude
Angeldude / service-checklist.md
Created September 22, 2017 14:06 — forked from wsargent/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@Angeldude
Angeldude / win10-dev.md
Created September 22, 2017 14:03 — forked from wsargent/win10-dev.md
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Sadly, much of this pertains to Git, GPG, SSH, and Windows all not working, rather than Windows Subsystem for Linux. There is no unified command line experience for native Windows still -- instead, there's a bunch of different conflicting programs which all bring along their own environment and need to be told about each other.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially:

@Angeldude
Angeldude / AWS S3-Paperclip5-Heroku.md
Created August 28, 2017 22:06 — forked from belgoros/AWS S3-Paperclip5-Heroku.md
Setup Rails app with Paperclip 5, Amazon S3 and Heroku

Setting Amazon S3 for Paperclip and Heroku

The latest Paperclip release 5.1.0 has changed a little bit the way to set it up with Amazon S3 service (Amazon Simple Storage Service). Moreover, after googling a lot here and there, we could see many solutions and settings, some of them being outdated, some - often different and did not work well. So I decided to summarize in one replace all the steps needed to set up your Rails application deployed on Heroku and be able to use it with Paperclip 5 and Amazon S3 service.

In case you don't know, Heroku does not allow your Rails application to write and offers read only access. What means that you can't use Paperclip and save your files to Heroku's file system.

So you will have to find a way to upload/store/read your files. As stated in Paperclip documentation, Paperclip ships with 3 storage adapters: