Skip to content

Instantly share code, notes, and snippets.

View michaelmano's full-sized avatar
:octocat:
Focusing

Michael Mano michaelmano

:octocat:
Focusing
View GitHub Profile
@michaelmano
michaelmano / .eslintrc.cjs
Last active October 7, 2022 04:40
Configurations
module.exports = {
root: true,
env: {
browser: true,
},
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
project: ['tsconfig.json'],
@michaelmano
michaelmano / Coverage Badges
Last active July 29, 2022 07:11
Coverage Badges
Coverage Badges
[
{
"spanish": "el,la",
"english": "the"
},
{
"spanish": "de",
"english": "of, from"
},
{
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(array(
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'native_function_invocation' => true,
'native_constant_invocation' => true,
'native_function_casing' => true,
@michaelmano
michaelmano / debounce.js
Last active June 11, 2018 07:16
ES6 Callback debounce
"use strict"
/**
* window.addEventListener('scroll', debounce(() => console.log('Window scrolled.')));
*/
const debounce = function debounce(callback, delay = 250) {
let timeout = null;
return () => {
clearTimeout(timeout);
timeout = setTimeout(() => callback.apply(this, arguments), delay);
# Clone the files
git clone git@github.com:Neilpang/acme.sh.git /home/ubuntu/.acme.sh
# Edit https://github.com/Neilpang/acme.sh/blob/master/dnsapi/dns_cf.sh#L4 and https://github.com/Neilpang/acme.sh/blob/master/dnsapi/dns_cf.sh#L6 and add your cloudflare API Key and email
nano /home/ubuntu/.acme.sh/dnsapi/dns_cf.sh
# Run
./acme.sh --issue -d example.com -d '*.example.com' --dns dns_cf
# Now create the cronjob to renew it
@michaelmano
michaelmano / .bash_profile
Last active January 23, 2019 23:11
Bash Profile
# Exports
## Development Paths
export DEV_DIR="${HOME}/Development"
export SCRIPTS_DIR="${DEV_DIR}/Scripts"
export TOOLS_DIR="${DEV_DIR}/Tools"
## Load all scripts from the SCRIPTS_DIR
for script in $SCRIPTS_DIR/*; do . $script; done
@michaelmano
michaelmano / README.md
Last active March 7, 2018 01:30
New Project Readme
@michaelmano
michaelmano / functions.js
Last active November 21, 2016 07:51
Wordpress Ajax post
$("li.terms").click(function() {
document.getElementById('content-top').scrollIntoView("smooth");
var nav = document.getElementById('ajax-nav').style.padding = "20px 0 0 40px"
$("li.terms").removeClass('current');
$(this).addClass('current');
$("#ajax-columns").addClass('loading');
var postType = $(this).attr("data-post-type");
var tax = $(this).attr("data-taxonomy-name");
var catID = $(this).attr("data-category");
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';