Skip to content

Instantly share code, notes, and snippets.

View jwrigh26's full-sized avatar

Justin Wright jwrigh26

View GitHub Profile
@jwrigh26
jwrigh26 / node_nginx_ssl.md
Created October 15, 2021 03:19 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@jwrigh26
jwrigh26 / TimerWithGCD.md
Last active September 5, 2016 19:29
Creating a timer with Grand Central Dispatch

##Creating a timer with Grand Central Dispatch

At the following is the implementation file of a sample class that shows, how to make a timer with the help of Grand Central Dispatch. The timer fires on a global queue, just change the queue to the main queue or any custom queue and the timer fires on this queue and not on the global queue anymore.

This was modified for swift 2.2 Also created an example of a background global queue variable. As well as a callback in the start timer so you can do some cool stuff everytime the timer is called.