Skip to content

Instantly share code, notes, and snippets.

@yahelc
yahelc / slackbot_change_monitor.py
Created November 2, 2019 00:14
A script that monitors changes and deletions to Slackbot messages using undocumented Slack APIs.
import requests
import json
import datetime
import time
SLACK_PERSONAL_TOKEN = ''
#only needed for deletion restoree
WEBSLACK_TOKEN = ''
@yahelc
yahelc / slackbot_change_monitor.py
Last active November 2, 2019 00:19
A script that monitors changes and deletions to Slackbot messages using undocumented Slack APIs. SLACK_PERSONAL_TOKEN can be generated here https://api.slack.com/custom-integrations/legacy-tokens
import requests
import json
import datetime
import time
SLACK_PERSONAL_TOKEN = ''
#only needed for deletion restoree
WEBSLACK_TOKEN = ''
@yahelc
yahelc / slackbot_change_monitor.py
Created November 2, 2019 00:14
A script that monitors changes and deletions to Slackbot messages using undocumented Slack APIs.
import requests
import json
import datetime
import time
SLACK_PERSONAL_TOKEN = ''
#only needed for deletion restoree
WEBSLACK_TOKEN = ''
@yahelc
yahelc / savedhar.harp
Created November 2, 2015 16:30 — forked from anonymous/savedhar.harp
Anonymous HAR saved from harfiddle.com
onInputData({
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
},
"pages": [
{
"startedDateTime": "2015-11-02T16:22:37.316Z",
@yahelc
yahelc / gist:ad2fbadcea57d6f72001
Created May 15, 2015 16:10
Deobfuscate Silverpop's %%RECIPIENTID%%
function deobfuscate_sp_recipientid(a) {
var b = a.length,
c = a.substring(b -
1);
a = a.substring(0, b - 2);
switch (parseInt(c, void 0)) {
case 1:
a += "*";
break;
case 2:
@yahelc
yahelc / gist:6b1fd69769822550f88b
Created January 27, 2015 23:02
Bookmarklet to make current URL the canonical URL (or strip out the query string and anchor if there's no canonical URL)
javascript:var c = document.querySelector("link[rel=canonical]") || location.pathname; if(c){ history.replaceState({},document.title, c); }
$(".content-wrapper").hide();
$("head").append("<style>#cboxTitle{ font-size: 20pt; white-space:pre; } #cboxLoadedContent{ display:inline; } #cboxCurrent, #cboxContent button{ display: none !important;} #employeedetails, #employeename{ visibility:hidden} #cboxContent h1, #cboxContent img { padding: 1em; } #cboxContent{padding:2em; }</style>");
$("img").addClass("pic").each(function(){ return $(this).attr("href", this.src).attr("title", $(this).closest("article").clone().find('span,script,.phone').remove().end().text().replace(/ /g,"").trim()+"\nJoined "+ $(this).closest("article").data("startdate").replace(/\%/g,"")) });
$(".pic").colorbox({transition: 'fade', rel:'pic', slideshow:true, width:"99%", height:"99%", opacity: 1, slideshowSpeed: 8000});
$("#cboxContent").css({"background-color": "white"});

Keybase proof

I hereby claim:

  • I am yahelc on github.
  • I am yahel (https://keybase.io/yahel) on keybase.
  • I have a public key whose fingerprint is 8C58 12D4 4B60 2BD6 0C6F F414 83E5 C482 EFA2 8610

To claim this, I am signing this object:

@yahelc
yahelc / bsd-spudless-sourcing.js
Last active December 21, 2015 19:28
BSD SPUD-less Sourcing Script
(function(){
var get = (function() {
var map = {};
location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, k, v) {
map[k] = v;
});
return map;
} ());
function readCookie(a){return(RegExp("(?:^|; )"+a+"=([^;]*)").exec(document.cookie)||[]).pop();}
jQuery.ajax({
url: "https://BSD-CLIENT-DOMAIN.com/page/spud?jsonp=?",
dataType: "jsonp",
data: {
type: "getm",
field: "firstname,lastname,email,lastlogin,source"
},
jsonp: "jsonp",
success: function(data){
console.log(data ,data.source, data.email);