Skip to content

Instantly share code, notes, and snippets.

View vamuigua's full-sized avatar
💠
KAIZEN 💯

Victor Allen vamuigua

💠
KAIZEN 💯
View GitHub Profile
@sidben
sidben / server-setup-php74.sh
Last active October 25, 2022 17:57
Script to setup NGINX / PHP for Laravel projects on AWS EC2 instances running Ubuntu (20.04)
#!/bin/bash
sudo apt update -y && sudo apt upgrade -y
sudo apt install zip unzip certbot python3-certbot-nginx software-properties-common -y
# AWS
sudo apt install awscli -y
# Remove Apache, Install NGINX
sudo systemctl stop apache2 && sudo systemctl disable apache2
sudo apt remove apache2 -y
apt-get update
apt-get upgrade
apt install -y nginx
systemctl enable nginx
systemctl start nginx
apt-add-repository ppa:ondrej/php -y
systemctl enable php7.4-fpm
systemclt start php7.4-fpm
apt install -y php7.4 php7.4-{cli,gd,curl,mysql,ldap,zip,fileinfo,fpm,xml,mbstring,exif,pspell,imagick,bcmath}
apt install mariadb-server mariadb-client
@bondgeek
bondgeek / showFile.js
Last active July 26, 2023 13:38
open pdf in pop-up from a blob
/* Use case: returning pdf as blob from XHR request,
for example when the endpoint is secure and needs an Authorization header
NB: responseType on fetch for blobData has to be "blob".
PDF files are not UTF-8, they are binary, so otherwise fonts won't appear properly
*/
const showFile = (blobData, reportName) => {
// Adapted from: https://blog.jayway.com/2017/07/13/open-pdf-downloaded-api-javascript/
const fileName = reportName && `${ reportName }.pdf` || 'myreport.pdf';
@DomPizzie
DomPizzie / README-Template.md
Last active April 24, 2024 20:29
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@Michael-Brooks
Michael-Brooks / passwordValidation.php
Last active February 16, 2024 09:29
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
<?php
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
* Password is required with a minimum of 6 characters
* Should have at least 1 lowercase AND 1 uppercase AND 1 number
*/
$rules = [
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
];
@mlanett
mlanett / rails http status codes
Last active April 13, 2024 13:40
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@rxaviers
rxaviers / gist:7360908
Last active April 25, 2024 11:15
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@somebox
somebox / gh-like.css
Created July 14, 2011 14:55
github markdown css+script with syntax highlighting. Works with http://markedapp.com
/*
Some simple Github-like styles, with syntax highlighting CSS via Pygments.
*/
body{
font-family: helvetica, arial, freesans, clean, sans-serif;
color: #333;
background-color: #fff;
border: none;
line-height: 1.5;
margin: 2em 3em;