Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Alejandro Ventura alexventuraio

🏠
Working from home
View GitHub Profile
@alexventuraio
alexventuraio / web-servers.md
Created May 7, 2016 — forked from willurd/web-servers.md
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@alexventuraio
alexventuraio / rails-postgres-backbone-bootstrap-bootswatch
Created Aug 7, 2016 — forked from sionc/rails-postgres-backbone-bootstrap-bootswatch
Instructions on creating a new app using Ruby on Rails, Postgresql, Backbone.js, Twitter Boostrap, Bootstwatch
View rails-postgres-backbone-bootstrap-bootswatch
- Check rails version
$ rails -v
- To update rails
$ gem update rails
- Creating a new rails app using postgresql
$ mkdir rails_projects
$ cd rails_projects
$ rails new myapp --database=postgresql
@alexventuraio
alexventuraio / flightplan-deploy.md
Created Sep 22, 2016 — forked from learncodeacademy/flightplan-deploy.md
Deploy Node.js Apps with Flightplan
View flightplan-deploy.md

##Setup your server (this would ideally be done with automated provisioning)

  • add a deploy user with password-less ssh see this gist
  • install forever npm install -g forever

##Install flightplan

  • npm install -g flightplan
  • in your project folder npm install flightplan --save-dev
  • create a flightplan.js file
@alexventuraio
alexventuraio / node-deploy-as-upstart-service.md
Created Sep 22, 2016 — forked from learncodeacademy/node-deploy-as-upstart-service.md
Deploy Node.js app on Ubuntu as Upstart Service - instead of using Forever
View node-deploy-as-upstart-service.md

Deploying a node app with Forever is great...until your server restarts unexpectedly. Then your app stops running and you have to re-deploy.

To get around this, we're going to run our node app as an Upstart service. Upstart services are great, because, once started, the system auto-restarts them if they fail, or if the server restarts.

###Step 1: Create a service for your node app

  • ssh in as root ssh root@youripaddress
  • Create a node-app.conf file in /etc/init
    IMPORTANT: whatever filename you pick is what you will use to start|stop|restart your service i.e. service node-app start
@alexventuraio
alexventuraio / railscasts.rb
Created Dec 9, 2016 — forked from samqiu/railscasts.rb
Download free Railscast video
View railscasts.rb
#!/usr/bin/ruby
require 'rss'
# Usage
# $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/
# episodes.rss
# OR
# $ ./railscasts.rb
p 'Downloading rss index'
@alexventuraio
alexventuraio / Rules.md
Last active Mar 26, 2018
Bases - Rifa equipo MacBook Pro
View Rules.md

Bases de la Rifa

Registra tus datos de contacto y la cantidad de boletos que deseas comprar. En seguida me pondré en contacto contigo para que selecciones tus boletos de los números disponibles.

Importante

  • La rifa se llevará acabo hasta que se hayan vendido todos los boletos para cubrir el costo del equipo, gracias por tu comprensión.
  • El costo del boleto es de $250.00 pesos MX cada uno y son un total de 100 boletos.
  • El numero ganador de la rifa es el que coincida con los últimos dos números del boleto ganador del Sorteo Mayor de la Lotería Nacional a celebrarse el martes siguiente a la fecha que se venda el último boleto.
  • El pago deberá efectuarse (a mi cuenta personal) inmediatamente después de elegir los números de los boletos.
  • Si por alguna razón la venta de boletos no se termina antes del 26 de Mayo de 2018, cada comprador podrá pedir el reembolso total e integro de su compra.
  • Si para el 26 de Mayo se ha vendido al menos el 90% de boletos (90 boletos) la rifa SI se llevará acabo.
@alexventuraio
alexventuraio / sponsor.matchxperience.css
Last active Aug 21, 2018
CSS styles from Sponsor MatchXperience
View sponsor.matchxperience.css
form .fieldset{background:#f5f2f0;margin:35px}form .fieldset .delete_box{margin-bottom:25px}.chips .chip:first-child{margin:10px 5px 0px 0px}.chips .chip{margin:5px 5px 0px 0px}.chips .input{margin:5px 0px 0px 0px}.parallax-container{height:400px}.parallax-container{min-height:380px;line-height:0;height:auto;color:rgba(255,255,255,0.9)}.overlay{background-color:rgba(0,0,0,0.6);padding:1px 0px}.panel-box{display:flex;flex-wrap:wrap;justify-content:center;margin:0}.panel-box.space-between{justify-content:space-between}.panel-item{height:150px;margin:10px;text-align:center;width:300px}.panel-item a{display:flex;justify-content:center;align-items:center;height:100%;width:100%;padding:0;line-height:1.5}.panel-item a span{font-size:23px;margin:auto;width:95%}.gallery-container{display:flex;flex-wrap:wrap;justify-content:center}.gallery-item{box-shadow:0 0 0 10px #fff,0 0 0 11px rgba(117,188,38,0.5),0 20px 20px -12px #000;box-sizing:border-box;cursor:pointer;margin:1em;overflow:hidden;position:relative;width:100%}@m
@alexventuraio
alexventuraio / install react-devtools v3
Created Sep 19, 2019 — forked from oztune/install react-devtools v3
How to install React Dev Tools v3 so that you can have highlight updates again
View install react-devtools v3
1. Somewhere on your machine clone the project.
```
> git clone https://github.com/facebook/react-devtools.git
> cd react-devtools
```
2. Switch to the v3 branch
```
> git checkout v3
```
@alexventuraio
alexventuraio / xterm-256color.svg
Created Aug 22, 2020 — forked from jasonm23/xterm-256color.svg
Xterm 256color mode color chart, organised into sections.
View xterm-256color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.