Skip to content

Instantly share code, notes, and snippets.

@artnc
artnc / ga-all-bookmarklet.js
Created August 12, 2013 00:04
Open Google Analytics with custom date range
javascript:(function(){var date=new Date(),month=date.getMonth()+1,day=date.getDate(),today=date.getFullYear()+(month<10?"0":"")+month+(day<10?"0":"")+day;window.open("https://www.google.com/analytics/web/?hl=en#dashboard/qPO8hKRkSyeyLrgrfA-MMQ/a30163394w56549290p57645749/%3F_u.date00%3D20120329%26_u.date01%3D"+today+"/","_blank");}());
@artnc
artnc / keybase.md
Last active May 3, 2017 15:38
keybase.md

Keybase proof

I hereby claim:

  • I am artnc on github.
  • I am artnc (https://keybase.io/artnc) on keybase.
  • I have a public key whose fingerprint is 2F71 7BE5 112A 04F1 E0F1 D5FA 5FC5 66E3 8689 A53C

To claim this, I am signing this object:

@artnc
artnc / router.py
Last active September 6, 2017 22:04
import hashlib
import requests
from flask import Flask, request
SLACK_CHANNEL = '#general'
SLACK_TOKEN = '********'
app = Flask(__name__)
@app.route('/mail', methods=['POST'])
@artnc
artnc / README.md
Last active November 1, 2017 20:56
GitHub pull request self-unassignment bookmarklet

Create a new browser bookmark and set its URL to this:

`javascript:function _asyncToGenerator(b){return function(){var c=b.apply(this,arguments);return new Promise(function(e,f){function g(h,i){try{var j=ch,k=j.value}catch(l){return void f(l)}return j.done?void e(k):Promise.resolve(k).then(function(l){g('next',l)},function(l){g('throw',l)})}return g('next')})}}_asyncToGenerator(regeneratorRuntime.mark(function b(){var c,e,f,g,h,i,j,k,l,m,n;return regeneratorRuntime.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(c=function(q){return Array.prototype.slice.call(q)},e=function(q){return new Promise(function(r){return setTimeout(r,q)})},f=document.documentElement.scrollTop,g=document.querySelectorAll('.sidebar-assignee')[1],h=c(g.querySelectorAll('p .assignee')),i=document.querySelector('meta[name=user-login]').content,h.some(function(q){return q.textContent===i})){p.next=9;break}return alert('You're not assigned!'),p.abrupt('return');case 9:j=g.querySelector('.discussion-sidebar-toggle'),j.click()