Skip to content

Instantly share code, notes, and snippets.

View artoodeeto's full-sized avatar
:octocat:
Hello World =)

aRtoo artoodeeto

:octocat:
Hello World =)
  • Dentca
  • Orange, California
View GitHub Profile
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active December 2, 2024 13:24
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

@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active December 2, 2024 11:18
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@parmentf
parmentf / GitCommitEmoji.md
Last active December 2, 2024 11:06
Git Commit message Emoji
@ybakos
ybakos / Random.jack
Created November 3, 2014 20:12
Jack Pseudo Random Numbers for Nand 2 Tetris
/* Random.jack
* By Mark Armbrust
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Random-number-generator-for-hack-cpu-td4025503.html
* Also see:
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Pseudo-Random-Number-Generator-td4026059.html#a4027617
*/
class Random {
static int seed;
@lancejpollard
lancejpollard / node-folder-structure-options.md
Created November 28, 2011 01:50
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
@jcasimir
jcasimir / render_and_redirect.markdown
Created September 11, 2011 21:29
Render and Redirect in Rails 3

Render and Redirect

The normal controller/view flow is to display a view template corresponding to the current controller action, but sometimes we want to change that. We use render in a controller when we want to respond within the current request, and redirect_to when we want to spawn a new request.

Render

The render method is very overloaded in Rails. Most developers encounter it within the view template, using render :partial => 'form' or render @post.comments, but here we'll focus on usage within the controller.

:action

@pksunkara
pksunkara / config
Last active November 30, 2024 16:37
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta