Skip to content

Instantly share code, notes, and snippets.

View Damiloju's full-sized avatar
🎯
Focusing

Dami Damiloju

🎯
Focusing
View GitHub Profile
@Damiloju
Damiloju / README.md
Created June 16, 2020 00:12 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@Damiloju
Damiloju / cloudSettings
Last active September 27, 2020 00:27
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-14T14:58:06.386Z","extensionVersion":"v3.4.3"}
@Damiloju
Damiloju / gulpfile.js
Created April 11, 2020 08:19
Gulp File for nuxt deployment
const gulp = require("gulp");
const awspublish = require("gulp-awspublish");
const cloudfront = require("gulp-cloudfront-invalidate-aws-publish");
const parallelize = require("concurrent-transform");
// https://docs.aws.amazon.com/cli/latest/userguide/cli-environment.html
const config = {
// Required
params: {
@Damiloju
Damiloju / execute.js
Created April 11, 2020 08:11
Make Deploy.sh executable
chmod +x deploy.sh
echo "
# Don't commit build files
node_modules
dist
.nuxt
.awspublish
deploy.sh
" >> .gitignore
@Damiloju
Damiloju / deploy.sh
Created April 11, 2020 07:56
Deploy script for nuxt tutorial
#!/bin/bash
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export AWS_BUCKET_NAME=
export AWS_CLOUDFRONT=
# Load nvm (node version manager), install node (version in .nvmrc), and npm install packages
[ -s "$HOME/.nvm/nvm.sh" ] && source "$HOME/.nvm/nvm.sh" && nvm use
# Npm install if not already.
@Damiloju
Damiloju / custom.js
Last active September 14, 2020 18:07
import { extend } from "vee-validate"; //import extend function from vee-validate
extend("password", {
message:
"{_field_} must be at least 8 characters, contain One Uppercase, One lowercase, One Special character i.e (! @ # $ % ^ & *), One number.",
validate: value => {
const strong_password = new RegExp(
"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})"
); // regex to check our strong password
@Damiloju
Damiloju / gist:af46684e9af37d6d3e4748a1c2c57d4e
Last active November 7, 2019 07:58
gist for greating unique IDs
@Damiloju
Damiloju / luhnImplementation.js
Last active July 15, 2019 19:43
Luhn Validation Algorithm
/**
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers
* @author Oluwadamiloju. Copyright (c) 2019.
*/
const validateWithLuhn = (digits) => {
if (digits.length !== 16) {
return false;
}
@Damiloju
Damiloju / README.md
Created January 14, 2018 05:41 — forked from hofmannsven/README.md
My simply Git Cheatsheet