Skip to content

Instantly share code, notes, and snippets.

Avatar

Lawrence Cherone lcherone

View GitHub Profile
@lcherone
lcherone / asyncDirListNaturalSort.js
Last active May 3, 2019 — forked from oliverswitzer/nonModuleDirList.js
Async load list of files from directory, with optional extensions filtering and natural sort in nodejs
View asyncDirListNaturalSort.js
// asyncDirListNaturalSort.js
const path = require('path')
const fs = require('fs')
/**
* Asynchronous load list of files from directory,
* - with optional extensions filtering and natural sort
*
* @param {string} dirPath directory path to folder
View DigitalOcean_NoVNC_Paste.js
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@lcherone
lcherone / gh-pages-deploy.md
Created Apr 25, 2018 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).
View gh-pages-deploy.md

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@lcherone
lcherone / README.md
Last active Apr 9, 2018 — forked from remarkablemark/README.md
Classes - ES5 vs ES6
View README.md

JavaScript Classes - ES5 vs ES6

An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.

@lcherone
lcherone / disposable-email-provider-domains
Last active Oct 27, 2020 — forked from michenriksen/disposable-email-provider-domains
List of disposable email provider domains
View disposable-email-provider-domains
0815.ru
0815.ru0clickemail.com
0815.ry
0815.su
0845.ru
0clickemail.com
0-mail.com
0wnd.net
0wnd.org
10mail.com
View deploy.php
<?php
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';