Skip to content

Instantly share code, notes, and snippets.

@steeleforge
steeleforge / blockpromoted.js
Created July 7, 2019 21:40
block twitter users with promoted ads
javascript:localStorage.removeItem( 'promoted_accounts' );[...document.querySelectorAll('.promoted-account, .promoted-trend, .promoted-tweet')].map(el=>el.style.cssText='display:none!important');[...document.querySelectorAll('.promoted-tweet .js-actionBlock button')].map(el=>{if($){setTimeout(function() { $(el).trigger('click');$('.block-button').click(); },500) }});
@steeleforge
steeleforge / hidepromotedtweets
Created July 7, 2019 20:47
hide promoted tweets
javascript:[...document.querySelectorAll('.promoted-account,.promoted-trend,.promoted-tweet')].map(el=>el.style.cssText='display:none!important');localStorage.removeItem('promoted_accounts');
@steeleforge
steeleforge / flavortown.js
Last active September 6, 2017 18:11
flavortown bookmarklet - in your browser, create a new bookmark and copy/paste the below instead of a URL. Load your favorite boring website, and through your browser bookmarks menu, choose this bookmark to be teleported to flavortown.
javascript:eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('6 2=4[\'g\'](\'2\');2[\'f\']=\'<e h="2" j="m:l; z-d:n; b: 7; 9: 0; a: 0; c: 8%;" k="//i.C.o/A.B"/>\';4[\'y\'][\'x\'](2);6 t=\'v q! \';w 3(){t=t[\'5\'](1,t[\'p\'])+t[\'5\'](0,1);4[\'r\']=t;s(\'3()\',u)}3()',39,39,'||guy|_mq|document|substring|var|fixed|50|bottom|right|position|height|index|img|innerHTML|createElement|id||style|src|block|display|9999|com|length|USA|title|setTimeout||200|Flavortown|function|appendChild|body||rBudhgJ|gif|imgur'.split('|'),0,{}))
@steeleforge
steeleforge / gist:52b8c1e6659be6d6a1fe
Created September 23, 2014 14:33
Adobe-Marketing-Cloud AEM maven archetype
mvn archetype:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=sample-project-archetype -DarchetypeVersion=7
### Keybase proof
I hereby claim:
* I am steeleforge on github.
* I am steele (https://keybase.io/steele) on keybase.
* I have a public key whose fingerprint is 9425 350A F47E F42C AF4C C9A5 A196 C6AA 66D6 7FE2
To claim this, I am signing this object:
@steeleforge
steeleforge / gist:11388829
Last active August 29, 2015 14:00
Windows cmd copy/paste friendly AEM mvn archetype
mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/
@steeleforge
steeleforge / gist:5975569
Created July 11, 2013 13:45
dispacher_clean.sh is a utility to read a config file that contains human readable rules to control the deletion of files on a batch basis. That makes this file somewhat dangerous. Execute access is required to run this and it should only be run with a user that has read/write access limited to htdocs. A configuration file sample is also in this…
#!/bin/bash
# #
# David Steele - david.steele@acquitygroup.com
# 2013 Acquity Group
#
# The purpose of this script is to be run regularly as part of a cron job and delete cached files that either have become stale or should be regenerated or left deleted because another related asset is newer.
#
# Config expected pattern (ignore brackets)
# "delete files like <file pattern> in <relative directory path> older than <duration or file path>"
(ns redir.core
(:gen-class)
(:use
[clojure.string :only [split join]]
[clojure.java.io :only [reader writer]]
[clojure.tools.cli :only [cli]]
[fs.core :only [mkdir]]
:reload))
(defn fmt-match [in]
(str (clojure.string/replace-first in "/" "") "$"))
@steeleforge
steeleforge / index.js
Created September 27, 2011 19:03 — forked from iamnoah/index.js
Simple node.js webserver with logging. Serves whatever files are reachable from the directory where node is running. [support for Node for Windows]
/*
* Fork & Refactor of https://gist.github.com/246761
* -> Credit: Noah Sloan <http://noahsloan.com>
*/
/**
* Simple webserver with logging. Serves whatever files are reachable from
* the directory where node is running. Supports Windows port of node.
*/
var fs = require('fs'),
@steeleforge
steeleforge / gist:1241209
Created September 25, 2011 21:48 — forked from nathanmarz/gist:1228302
Example of defining a topology in Clojure
(use 'backtype.storm.clojure)
(use 'backtype.storm.config)
(require '[backtype.storm [thrift :as thrift]])
(import 'storm.starter.spout.RandomSentenceSpout)
(import 'backtype.storm.LocalCluster)
(defboltfull suffix-bolt ["word"]
:params [suffix]
:let [conf-state (atom nil)]
:prepare ([conf context collector]