Skip to content

Instantly share code, notes, and snippets.

View eulersson's full-sized avatar

Ramon Blanquer eulersson

  • Barcelona
View GitHub Profile
NatElasticIP:
Type: AWS::EC2::EIP
NatGateway:
Type: AWS::EC2::NatGateway
Properties:
AllocationId: !GetAtt NatElasticIP.AllocationId
SubnetId: !Ref PublicSubnetOne
PrivateRouteTable:
InternetGateway:
Type: AWS::EC2::InternetGateway
GatewayAttachment:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
InternetGatewayId: !Ref InternetGateway
VpcId: !Ref VPC
PublicRouteTable:
VPC:
Type: AWS::EC2::VPC
Properties:
EnableDnsSupport: true
EnableDnsHostnames: true
CidrBlock: 10.0.0.0/16
Tags: # You can give
- Key: Name # pretty names to
Value: ECSFS VPC # your resources.
@eulersson
eulersson / ecsfs_parameters.yaml
Created February 19, 2019 23:54
Parameters, conditions resources and outputs.
Parameters:
HostedZoneName:
Type: String
Description:
(Optional) If you have a domain available registered with Route 53 you
can type it (e.g. 'foo.com.'; do not miss the final dot!). Then a DNS
record gets created on subdomain ecsfs.foo.com which will route to the
load balancer (the entry point of this application).
Conditions:
HasHostedZoneName: !Not [ !Equals [ !Ref HostedZoneName, '']]
@eulersson
eulersson / rpi_android_display.sh
Last active April 23, 2017 21:59
Using Android as RPi display
# =============================================================================
# ANDROID AS DISPLAY SCREEN FOR RASPBERRY PI
# =============================================================================
# Sets VNC so you can use your Android phone as display for Raspberry Pi. If
# you plug it via USB and use USB Tethering and install the required things
# (following steps in this file) it should work.
#
# Following this resources:
# https://www.raspberrypi.org/forums/viewtopic.php?f=41&t=127971
# http://rageweb.info/2013/11/07/bootconfig-txt-in-kali/
@eulersson
eulersson / metaballs.glsl
Last active February 27, 2017 15:01
Metaballs (Synthclipse)
uniform vec3 iResolution; // viewport resolution (in pixels)
uniform float iGlobalTime; // shader playback time (in seconds)
uniform float iChannelTime[4]; // channel playback time (in seconds)
uniform vec3 iChannelResolution[4]; // channel resolution (in pixels)
uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click
uniform vec4 iDate; // (year, month, day, time in seconds)
uniform bool WithGamma; //! checkbox[true]
uniform float Gamma; //! slider[0.1, 2.2, 10]
uniform float tete; //! slider[0.0, 0.1, 0.2]
@eulersson
eulersson / sshtunnel.sh
Last active April 4, 2017 12:09
SSH Tunel
# ///////////////////////////////////////
# SSH Tunneling
# How it looks like:
# [UNI]<-->[CLOUD (relay)]<-->[CLIENT]
# UNI: localhost (127.0.0.1)
# CLOUD: posvec.xyz (46.101.1.33)
# CLIENT: any IP you have or connect from
# ///////////////////////////////////////
# Steps:
@eulersson
eulersson / .vimrc
Last active February 27, 2017 14:59
Vim profile
set ts=2 tabstop=2 shiftwidth=2 expandtab autoindent
autocmd FileType python nnoremap <buffer> <F9> :exec '!python' shellescape(@%, 1)<cr>
autocmd FileType javascript nnoremap <buffer> <F9> :exec '!node' shellescape(@%, 1)<cr>
@eulersson
eulersson / installprefix.sh
Last active February 27, 2017 14:57
Changing install destination of compiled libraries
# /////////////////////////////////////////
# Choosing where library will be installed:
# /////////////////////////////////////////
# Option 1:
./configure --prefix=/path/where/to/install
# Options 2:
cmake -DCMAKE_INSTALL_PATH=/path/where/to/install .
# Option 3:
export DESTDIR=/path/where/to/install && make install