Skip to content

Instantly share code, notes, and snippets.

View alphaolomi's full-sized avatar
🎯
Focusing

Alpha Olomi alphaolomi

🎯
Focusing
View GitHub Profile
@alphaolomi
alphaolomi / custom_localhost_url.md
Last active March 25, 2020 14:32
Custom localhost Url

Custom Localhost URL

For Windows

Assuming using XAMPP Server

  1. Open [C:\Windows\System32\Drivers\etc\hosts](file://C:\Windows\System32\Drivers\etc\hosts)
127.0.0.1     something.local
@alphaolomi
alphaolomi / django_cheat_sheet.py
Last active July 23, 2020 17:11
[Django] Cheat Sheet #python #django
# *****************************************************************************
# CODING STYLE > MAKING YOUR CODE READABLE
# *****************************************************************************
# 1. Avoid abbreviating variable names.
# 2. Write out your function argument names.
# 3. Document your classes and methods.
# 4. Comment your code.

bits

Snippets of things I re-use but always forget exactly how to write it

HTML boilerplate

<!doctype html>
<html lang="en">
<head>
 
@alphaolomi
alphaolomi / Heroku with Node.js.md
Last active August 10, 2019 08:24
🚀 Getting Started on Heroku with Node.js

Heroku with Node.js

Deploy the app

In this step you will deploy the app to Heroku.

  1. Create an app on Heroku, which prepares Heroku to receive your source code.
heroku create
@alphaolomi
alphaolomi / countries.php
Created September 20, 2019 07:37
List of All Countries
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
'AO' => 'Angola',
'AI' => 'Anguilla',
'AQ' => 'Antarctica',
'AG' => 'Antigua And Barbuda',
@alphaolomi
alphaolomi / mysql.md
Created September 20, 2019 07:39
Mysql Quick Commands

Mysql Quick Commands

Using Command-Line Tools

MySQL and MariaDB include two command-line tools that you can use to quickly backup and restore databases. The mysqldump tool is used to export the contents of a database to a text file, while the mysql client can be used to import data from a text file into a MySQL/MariaDB database.

To backup a MySQL/MariaDB database from the command line, follow these steps:

  1. Launch a new Windows command shell using the "Shell" button in the XAMPP control panel.
@alphaolomi
alphaolomi / msql_change_pwd.md
Last active September 20, 2019 07:47
MySQL Cheat Sheet

Change Root Password

sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysqld stop

sudo mysqld_safe --skip-grant-tables &

mysql -u root
@alphaolomi
alphaolomi / pipenv_cheat_sheet.md
Created September 20, 2019 07:40
Pipenv Cheat Sheet

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@alphaolomi
alphaolomi / linux_quick_commands.md
Created September 20, 2019 07:41
Linux Quick Commands

Linux Quick Commands

Add mysql to your PATH

# Current Session
export PATH=${PATH}:/usr/local/mysql/bin
@alphaolomi
alphaolomi / infyom_generator_quick.md
Created September 20, 2019 07:41
Infyom Generator

Infyom Generator

Examples

php artisan infyom:api $MODEL_NAME

php artisan infyom:scaffold $MODEL_NAME

php artisan infyom:api_scaffold $MODEL_NAME