Skip to content

Instantly share code, notes, and snippets.

View fzrhrs's full-sized avatar

fzrhrs

View GitHub Profile
@fzrhrs
fzrhrs / Github
Last active November 16, 2016 09:35
Github
git show commithash
git log --author=name
git log --grep=word
(undo last commit)
git reset --soft HEAD~1
(ammend last commit message)

count rows SELECT COUNT(column_name) FROM table_name;

@fzrhrs
fzrhrs / ghostonmac.md
Created April 16, 2016 01:39
Ghost on Mac and Heroku

Local mac: npm install --production

sudo echo node_modules > .gitignore git init git add . git commit -m 'Initial commit'

heroku create app-name

@fzrhrs
fzrhrs / django.md
Last active November 9, 2016 03:28
Setup django on Mac

Python 2.7 django pip install django

to use mysql pip install MySQL-Python or maybe pip install mysqlclient

database example:

@fzrhrs
fzrhrs / bash.md
Created January 24, 2018 11:31
Cheatsheet

grep something from text file: grep "phrase-here" production.log; tail -f production.log

@fzrhrs
fzrhrs / Part 1 of 3: Rails Deployment Ubuntu 24.04 (2024).md
Last active April 4, 2025 05:36
Part 1 of 3: Rails Deployment Ubuntu 24.04 (2024)

Step 1 - Initial Server Setup

Assuming you already ssh-ed into the server as root.

Create a new user

We need to set up a new user account with reduced privileges for day-to-day use.

sudo adduser deploy