Skip to content

Instantly share code, notes, and snippets.

View jpgiago's full-sized avatar

John Paul Giago jpgiago

View GitHub Profile
@jpgiago
jpgiago / README.md
Created May 21, 2023 14:21 — forked from noraj/README.md
Install Firefox Developer Edition

Install Firefox Developer Edition

This script intend to provide an automatic installation of Mozilla Firefox Developer Edition for x86_64 Linux distros.

Firefox Developer Edition

Firefox Developer Edition is installed to /opt/firefox-dev/.

Note:

  • Default language is en-US, feel free to manually change it in the script.
@jpgiago
jpgiago / space-shift-karabiner.json
Created January 31, 2023 05:42
Karabiner Elements - spacebar -> left_shift (tap & hold with delay)
{
"description": "spacebar -> left_shift (spacebar if pressed alone)",
"manipulators": [
{
"from": {
"key_code": "spacebar",
"modifiers": {
"optional": ["any"]
}
},
@jpgiago
jpgiago / index.js
Last active October 26, 2019 16:58
Basic Webpack 4 configuration for dummies (like myself) ... grokked from https://dev.to/pixelgoo/how-to-configure-webpack-from-scratch-for-a-basic-website-46a5
import '../scss/style.scss';
console.log('Hi');
@jpgiago
jpgiago / .gitignore
Last active April 27, 2018 15:42 — forked from salcode/.gitignore
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20160309
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@jpgiago
jpgiago / .gitignore
Created April 23, 2018 17:30 — forked from salcode/.gitignore
.gitignore file for a general web project - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20170502
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@jpgiago
jpgiago / .gitignore
Last active October 11, 2017 14:35 — forked from lukesims/.gitignore
OctoberCMS .gitignore
# ------------------------------------------------------------------------------
# .gitignore for OctoberCMS (http://octobercms.com/)
# Based on https://gist.github.com/salcode/b515f520d3f8207ecd04 for WordPress
# ------------------------------------------------------------------------------
# By default all files are ignored.
#
# At the end of the file you will need to whitelist themes and plugins you want
# to include in the repo.
#
# Update the {PLACEHOLDERS} to reflect your setup.
@jpgiago
jpgiago / package.json
Last active April 18, 2021 04:14
NPM script automations w/ PostCSS & BrowserSync
{
"name": "my-project",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "run-p watch browsersync",
"watch": "npm run build -- -w",
"build": "postcss assets/css/main.css -o assets/css/bundle.css",
"browsersync": "browser-sync start --proxy 'http://localhost.dev' --files 'layouts' 'pages' 'partials' 'assets/css/'"
@jpgiago
jpgiago / page.php
Last active September 23, 2017 20:31
Google v2 ReCaptcha
<html>
<head>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<div>
<form action="recaptcha.php" method="post">
<!-- Form elements... -->
<!-- DIV container with g-recaptcha class -->
@jpgiago
jpgiago / .htaccess
Created July 21, 2017 19:11
Apache .htaccess Hotswap
<IfModule mod_rewrite.c>
# ----------------------------------------------
# .htaccess main domain to subdirectory redirect
# Do not change this line.
# ----------------------------------------------
RewriteEngine on
# -----------------------------------------
@jpgiago
jpgiago / makeAjaxCall.js
Created April 24, 2017 20:54
Call AJAX using Promise
function makeAjaxCall(url, methodType){
var promiseObj = new Promise(function(resolve, reject){
var xhr = new XMLHttpRequest();
xhr.open(methodType, url, true);
xhr.send();
xhr.onreadystatechange = function(){
if (xhr.readyState === 4){
if (xhr.status === 200){
console.log("xhr done successfully");
var resp = xhr.responseText;