Skip to content

Instantly share code, notes, and snippets.

View studio4s's full-sized avatar

Studio4s studio4s

View GitHub Profile
@studio4s
studio4s / deploy_from_subfolder.md
Created April 19, 2021 18:18 — forked from dariye/deploy_from_subfolder.md
Deploying to Heroku from Subfolder

Context

What happens when you have a nested directory you want to deploy i.e

./root_dir/
|__sub_dir
|__..

Usage

@studio4s
studio4s / semantic-commit-messages.md
Created February 19, 2021 08:31 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@studio4s
studio4s / mysqldump-cron.sh
Last active September 4, 2019 09:05 — forked from lymanlai/mysqldump-cron.sh
this script will mysqldump your db daily, weekly and monthly. and it will only keep three of them, while doing the fourth backup, it will delete the first one first.
#!/bin/bash
MYSQL_USER="yourname"
MYSQL_HOST="localhost"
MYSQL_PASSWORD="yourpassword"
MYSQL_DATABASES="'db_name_1' 'db_name_2' 'db_name_3'"
MYSQL_BIN="$(which mysql)"
MYSQLDUMP_BIN="$(which mysqldump)"
STORE_FOLDER="."
@studio4s
studio4s / npm-commands.md
Created August 31, 2019 09:49 — forked from ankurk91/npm-commands.md
Useful npm commands and tricks

npm v3.10 - ◾

If you are learning npm then i would suggest to go for yarn, dont waste your time in learning npm

⚠️ This gist is outdated, but most of the commands are still relevant.

Update npm itself

npm install -g npm
# Downgrade to a specific version
<pre data-bind="text: ko.toJSON($data, null, 2)"></pre>
@studio4s
studio4s / localhost-ssl-cert
Last active August 1, 2018 08:38 — forked from oslego/gist:f13e136ffeaa6174289a
create self-signed certificate for localhost
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
openssl rsa -in server.orig.key -out server.key