Skip to content

Instantly share code, notes, and snippets.


Romero Mckay helloromero

View GitHub Profile
helloromero / RouteIndicator.mjs
Created May 15, 2021 — forked from jaydenseric/RouteIndicator.js
A route change indicator for Next.js using React hooks.
View RouteIndicator.mjs
import Router from 'next/router'
import React from 'react'
const DONE_DURATION = 250
export const RouteIndicator = () => {
const [loading, setLoading] = React.useState(null)
const [timeoutId, setTimeoutId] = React.useState(null)
const onLoad = () => setLoading(true)
helloromero / register-graph-piece.php
Created Jul 10, 2020 — forked from jdevalk/register-graph-piece.php
This is the code used to generate the Event Schema for YoastCon
View register-graph-piece.php
* Adds Schema pieces to our output.
* @param array $pieces Graph pieces to output.
* @param \WPSEO_Schema_Context $context Object with context variables.
* @return array $pieces Graph pieces to output.
helloromero / gist:6a9f8c9e015cddf16c343ec4326fb230
Created Apr 4, 2019 — forked from jaredhirsch/gist:c9be82b168c5c823b407
how to delete your tweets just using your browser, no oauth required
View gist:6a9f8c9e015cddf16c343ec4326fb230
// 1. go to your twitter feed with tweets and replies
// for example, mine was
// 2. scroll all the way down to the bottom of the page.
// I suppose you could automate this with JS, but I didn't.
// this function will delete tweets you can delete, i.e. not retweets:
function deleteTweets() {
// find the next delete button in the DOM (next deletable tweet)
// and click the delete button. I wanted to keep the first tweet,
// which is why the index here is 1.
if (!$('.js-actionDelete').length) {
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import random
import sys
def print_same_line(text):
View delete.js
var delete_action_el = "btn primary-btn delete-action";
var delete_button_el = "js-actionDelete";
// Scroll
setInterval(function () {
window.scrollTo(0, document.body.scrollHeight);
}, 1000);
var _tweets = document.getElementsByClassName(delete_button_el);
helloromero / gist:d97a74c279fcbec8acaf4de3ecdd1eec
Created Jul 4, 2018
Hide after submitted (requieres js-cookie)
View gist:d97a74c279fcbec8acaf4de3ecdd1eec
$(function() {
var collect_chat_completed = Cookies.get('collect_chat_completed');
if (collect_chat_completed == "true" && !Cookies.get('collect_chat_timer')) {
Cookies.set('collect_chat_timer', 'true', { expires: 1 });
Cookies.set('collect_chat_completed', 'true', { expires: 1 });
Cookies.set('collect_chat_closed', 'true', { expires: 1 });
if (Cookies.get('collect_chat_completed') == "true") {
helloromero /
Created Feb 14, 2018 — forked from tzmartin/
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')[OFFICE_FILE_URL]

<iframe src='[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>

OneDrive Embed Links

helloromero / _center.mixin.scss
Created Nov 13, 2017 — forked from kieranmv95/_center.mixin.scss
Center anything horizontally vertically or on both axis in scss
View _center.mixin.scss
// Center anything horizontally, vertically or both (assuming that the parents position is set to relative)
// Codepen Example Usage:
@mixin center($center: 'all') {
position: absolute;
@if $center == 'all' {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
helloromero / gist:02c9de82e38d75a8aa13923815d0ebdd
Created Feb 8, 2017 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:02c9de82e38d75a8aa13923815d0ebdd

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
helloromero / Contract Killer
Created Mar 30, 2016 — forked from malarkey/Contract Killer
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post