Skip to content

Instantly share code, notes, and snippets.

View ssoulless's full-sized avatar
🤓
Working

Sebastian Velandia ssoulless

🤓
Working
View GitHub Profile
@zcaceres
zcaceres / Nested-Routers-Express.md
Last active April 4, 2024 09:44
Child Routers in Express

Nested Routers in Express.js

Express makes it easy to nest routes in your routers. But I always had trouble accessing the request object's .params when you had a long URI with multiple parameters and nested routes.

Let's say you're building routes for a website www.music.com. Music is organized into albums with multiple tracks. Users can click to see a track list. Then they can select a single track and see a sub-page about that specific track.

At our application level, we could first have a Router to handle any requests to our albums.

const express = require('express');
@dovy
dovy / Sendy.md
Last active January 12, 2022 19:50 — forked from danielepolencic/Sendy.md

Sendy

Sendy is a self hosted email newsletter application that lets you send trackable emails via Amazon Simple Email Service (SES).

Heroku

You can deploy Sendy on Heroku using the following instructions (I assume you've already installed the heroku toolbelt).

  1. On Heroku, create a new app.
  2. Clone that app to your desktop
@lfender6445
lfender6445 / gist:9919357
Last active March 28, 2024 08:38
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote

Please read the new and updated version.

Sendy

Sendy is a self hosted email newsletter application that lets you send trackable emails via Amazon Simple Email Service (SES).

Heroku

You can deploy Sendy on Heroku using the following instructions (I assume you've already installed the heroku toolbelt).

@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/