Skip to content

Instantly share code, notes, and snippets.

View musebe's full-sized avatar
🎯
Focusing

eugene musebe musebe

🎯
Focusing
View GitHub Profile
<div id="top" class="js-back-to-top-target" tabindex="-1"></div>
<a href="#main" class="c-skip-link u-visually-hidden btn btn-default">
Skip to content
</a>
<header id="header" class="header">
@musebe
musebe / terminal-commands.md
Created September 22, 2022 14:10 — forked from bradtraversy/terminal-commands.md
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@musebe
musebe / typescript-crash.ts
Created August 19, 2021 18:58 — forked from bradtraversy/typescript-crash.ts
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@musebe
musebe / node_nginx_ssl.md
Created May 25, 2020 18:38 — 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

@musebe
musebe / Install Graphics Magick on CentOS 7
Created December 9, 2019 07:10 — forked from abernardobr/Install Graphics Magick on CentOS 7
Install Graphics Magick on CentOS 7
# Get Graphics Magick
> cd /
> mkdir /dowload
> cd /download
> wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz
> tar -xzvf GraphicsMagick-LATEST.tar.gz
> cd GraphicsMagick-1.3.21 (or the lastest graphics magick)
# Install Graphics Magick
## Get libs
@musebe
musebe / mysql_cheat_sheet.md
Created April 23, 2019 08:26 — forked from bradtraversy/mysql_cheat_sheet.md
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

@musebe
musebe / files.handlebars
Created March 8, 2019 10:11
Loop through all files
<div class="d-flex mt-1 pt-3">
<div>
{{#each images.resources}}
<div class='col-sm-4 d-inline-flex pb-4' style='width: auto'>
<div class="card mx-auto">
<img class="card-img-top" src={{url}}
style="object-fit:none; object-position: center; width:300px; height: 300pc; max-height: 300px; max-width: 300px margin-bottom: 1rem;"
alt="home" />
<div class="card-body">
<p class="card-text"><b style='font-weight: 600'>Created On:</b><em style='font-weight: 100'>
@musebe
musebe / script.js
Last active March 8, 2019 10:08
cloudinary upload script
<script>
document.getElementById("upload_widget_opener").addEventListener("click", function () {
cloudinary.openUploadWidget({
cloud_name: 'your_cloud_name',
upload_preset: 'your_upload_preset',
max_image_width: 300,
max_image_height: 300,
crop: 'limit'
},
function (error, result) {
@musebe
musebe / index.handlebars
Last active March 7, 2019 17:38
Cloudinary
<div class="row">
<div class="col-md-6 mx-auto">
<h5 class="text-center display-5 my-4">File Uploads,retrieval and deletion</h5>
<form action="/uploads" method="POST" enctype="multipart/form-data">
<div class="custom-file mb-3">
<input type="file" name="image" id="image" class="custom-file-input" value="fileupload">
<label for="file" class="custom-file-label">Choose File</label>
</div>
<input type="submit" value="Submit" class="btn btn-primary btn-block">
</form>
@musebe
musebe / main.handlebars
Created March 7, 2019 16:27
Cloudinary file upload with node,express and handlebars
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Line Awesome -->