Skip to content

Instantly share code, notes, and snippets.

View samurai71's full-sized avatar

Mark Landeryou samurai71

  • Sarnia, Ontario Canada
  • 12:01 (UTC -04:00)
View GitHub Profile
@samurai71
samurai71 / alias.sh
Created July 27, 2025 03:16 — forked from ernestohs/alias.sh
how lazy I am
# BASH/ZSH ALIASES FOR THE LAZY DEVELOPER
## Git Workflow Aliases
### Push current branch to origin
alias push='git push origin $(git rev-parse --abbrev-ref HEAD)'
### Pull current branch with submodules
alias pull='git pull --recurse-submodules origin $(git rev-parse --abbrev-ref HEAD)'
### Show git status in short format
alias s="git status -s"
### Commit with message (usage: c "commit message")
@samurai71
samurai71 / nextjs-seo.md
Created August 27, 2024 15:10
Next SEO

export const metadata = { title: 'My Awesome Website', description: 'Discover amazing content and services on My Awesome Website',

// Basic metadata applicationName: 'My Awesome App', authors: [{ name: 'Stephen Omoregie', url: 'https://cre8stevedev.me' }], generator: 'Next.js', keywords: ['next.js', 'react', 'javascript'], referrer: 'origin-when-cross-origin',

@samurai71
samurai71 / privacy
Last active November 16, 2023 21:51
Canadian Privacy Policy Template
<h2>Privacy Policy for [Your Website Name]</h2>
<p>Last updated: [Date]</p>
<p>This Privacy Policy describes how [Your Website Name] ("we," "us," or "our") collects, uses, and shares personal information when you visit and interact with our website. Please review this policy carefully.</p>
<h3>1. Information We Collect</h3>
<p>Personal Information: We may collect personal information, including but not limited to, your name, email address, postal address, and phone number when you provide it voluntarily.</p>
@samurai71
samurai71 / license.md
Last active January 7, 2024 19:23
MIT license

Copyright (c) 2024 Mark Landeryou

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@samurai71
samurai71 / eslint_prettier_airbnb.md
Created February 20, 2022 02:10 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@samurai71
samurai71 / meta-tags.md
Created February 19, 2022 02:40 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@samurai71
samurai71 / README.md
Created April 10, 2018 21:03 — forked from sgnl/README.md
Setting up SASS (SCSS) files with gulp, gulp-sass, and Browser Sync!

Create a new temp project

  1. $ mkdir sass_gulp_workshop
  2. cd into the new directory
  3. Initialize NPM: $ npm init --yes
  4. Install gulp and gulp-sass packages: $ npm install -D gulp gulp-sass browser-sync
  5. Update package.json's scripts section with this key-value pair: "scripts": { "dev": "gulp" }
  6. Recreate this file structure in this directory:
  • public (directory)
    • css (directory)
    • index.html (file)
@samurai71
samurai71 / stars.php
Created March 28, 2018 16:31 — forked from bazub/stars.php
Star rating system using PHP/HTML/CSS
<html>
<style type="text/css">
.starRate {position:relative; margin:20px; overflow:hidden; zoom:1;}
.starRate ul {width:160px; margin:0; padding:0;}
.starRate li {display:inline; list-style:none;}
.starRate a, .starRate b {background:url(star_rate.gif) left top repeat-x;}
.starRate a {float:right; margin:0 80px 0 -144px; width:80px; height:16px; background-position:left 16px; color:#000; text-decoration:none;}
.starRate a:hover {background-position:left -32px;}
.starRate b {position:absolute; z-index:-1; width:80px; height:16px; background-position:left -16px;}
.starRate div b {left:0px; bottom:0px; background-position:left top;}
@samurai71
samurai71 / gist:c9e50036229a86d4ff75e9101e980e25
Created March 27, 2018 22:50 — forked from MauMaGau/gist:2579601
PHP: video conversion script
<?php
// Run from the command line, so we'll grab arguments from there
// input arguments: 0=>script, 1=>file_name, 2=>temp_file
$file_name = $argv[1];
$temp_file = $argv[2];
$uploads = '/opt/lampp/htdocs/user_uploads/';
// Set up file location strings
@samurai71
samurai71 / strong-passwords.php
Created February 16, 2018 21:17 — forked from tylerhall/strong-passwords.php
A user friendly, strong password generator PHP function.
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
// Note: the $add_dashes option will increase the length of the password by