Skip to content

Instantly share code, notes, and snippets.

Avatar

Romero Mckay helloromero

View GitHub Profile
@helloromero
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
<?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
helloromero / gist:6a9f8c9e015cddf16c343ec4326fb230
Created Apr 4, 2019 — forked from 6a68/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 twitter.com/6a68/with_replies
// 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) {
View Instagram_Bot.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import random
import sys
def print_same_line(text):
sys.stdout.write('\r')
sys.stdout.flush()
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
helloromero / gist:d97a74c279fcbec8acaf4de3ecdd1eec
Created Jul 4, 2018
Hide collect.chat 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") {
$('#collect-chat-launcher').hide();
}
@helloromero
helloromero / embedded-file-viewer.md
Created Feb 14, 2018 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive
View embedded-file-viewer.md

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@helloromero
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: https://codepen.io/anon/pen/yPbgYW
@mixin center($center: 'all') {
position: absolute;
@if $center == 'all' {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
@helloromero
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)

General

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

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

You can’t perform that action at this time.