Skip to content

Instantly share code, notes, and snippets.

@helloromero
helloromero / Contract Killer 3.md
Created March 30, 2016 09:12 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

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

@helloromero
helloromero / gist:02c9de82e38d75a8aa13923815d0ebdd
Created February 8, 2017 14:28 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

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 / _center.mixin.scss
Created November 13, 2017 09:34 — forked from kieranmv95/_center.mixin.scss
Center anything horizontally vertically or on both axis in 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 / embedded-file-viewer.md
Created February 14, 2018 17:54 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

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 / gist:d97a74c279fcbec8acaf4de3ecdd1eec
Created July 4, 2018 13:03
Hide collect.chat after submitted (requieres js-cookie)
$(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 / delete.js
Created December 8, 2018 15:25 — forked from erayarslan/delete.js
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);
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()
@helloromero
helloromero / gist:6a9f8c9e015cddf16c343ec4326fb230
Created April 4, 2019 08:42 — forked from jaredhirsch/gist:c9be82b168c5c823b407
how to delete your tweets just using your browser, no oauth required
// 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) {
@helloromero
helloromero / register-graph-piece.php
Created July 10, 2020 13:43 — forked from jdevalk/register-graph-piece.php
This is the code used to generate the Event Schema for YoastCon
<?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 / RouteIndicator.mjs
Created May 15, 2021 18:30 — forked from jaydenseric/RouteIndicator.js
A route change indicator for Next.js using React hooks.
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)