Skip to content

Instantly share code, notes, and snippets.

View sinak's full-sized avatar

Sina Khanifar sinak

View GitHub Profile
@sinak
sinak / gist:6984913
Created October 15, 2013 00:57
airmail trace
This file has been truncated, but you can view the full file.
Sampling process 15888 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling AirMail Beta (pid 15888) every 1 millisecond
Process: AirMail Beta [15888]
Path: /Applications/AirMail Beta.app/Contents/MacOS/AirMail Beta
Load Address: 0x1026eb000
Identifier: it.bloop.airmail.beta7
Version: 1.2 (208)
Code Type: X86-64 (Native)
Parent Process: launchd [144]
@sinak
sinak / gist:7361214
Created November 7, 2013 20:22
Add this text as a bookmark to download Soundcloud songs.
javascript: (function(a){var b,c,d,e=$(".sound"),f=require("config").get("client_id"),g=require("lib/connect").getAuthToken(),h=require("lib/helpers/conversion-helper"),i,j,k,l,m;for(b=e.length-1;b>=0;b--){c=$(e[b]);if(0==c.find(".sc-button-download").length){var n="https://soundcloud.com"+(c.find(".soundTitle__title").attr("href")||a.location.pathname);k={url:n,client_id:f},m=function(a){return function(b){var c={client_id:f};l=require("lib/url").stringify({query:c},b.stream_url+".mp3"),d=a.find(".sound__soundActions .sc-button-group"),j=d.find(".sc-button:first")[0].className.match(/sc-button-((?:small)|(?:medium))/)[1],i=$('<a class="sc-button sc-button-download sc-button-icon sc-button-responsive">Download</a>').attr({title:"Download this sound ("+h.bytesToMB(b.original_content_size)+")",href:l}).addClass("sc-button-"+j),d.append(i)}}(c),$.getJSON("http://api.soundcloud.com/resolve.json",k).success(m)}}})(window)
aris@kalix86:~/dualec$ ./dual_ec_drbg_poc
s at start of generate:
E9B8FBCFCDC7BCB091D14A41A95AD68966AC18879ECC27519403B34231916485
[omitted: many output from openssl]
y coordinate at end of mul:
0663BC78276A258D2F422BE407F881AA51B8D2D82ECE31481DB69DFBC6C4D010
r in generate is:
96E8EBC0D507C39F3B5ED8C96E789CC3E6861E1DDFB9D4170D3D5FF68E242437
Random bits written:
000000000000000000000000000000000000000000000000000000000000
'om': {
name: 'Free Press',
policy: 'http://www.freepress.net/privacy-copyright',
weight: 100
},
'fftf': {
name: 'Fight for the Future',
policy: 'http://www.fightforthefuture.org/privacy/',
weight: 100
var referalMap = {
'fp': {
name: 'Free Press',
policy: 'http://www.freepress.net/privacy-copyright'
},
'fftf': {
name: 'Fight for the Future',
policy: 'http://www.fightforthefuture.org/privacy/'
},
'org': {
name: 'Open Rights Group',
policy: 'https://www.openrightsgroup.org/privacy/'
},
'pi': {
name: 'Privacy International',
policy: 'https://www.privacyinternational.org/privacy-and-cookies-policy'
},
'eff': {
[
{
"country" : "AF",
"count" : 954
},
{
"country" : "US",
"count" : 5197
},
{

Keybase proof

I hereby claim:

  • I am sinak on github.
  • I am sinak (https://keybase.io/sinak) on keybase.
  • I have a public key whose fingerprint is 67B4 1CAF B2AF 069F 8480 0D78 E97C C024 3985 13DD

To claim this, I am signing this object:

@sinak
sinak / gist:5c8bcc06ab4f6cffbe72
Last active April 28, 2021 16:08
Shopify "Edit this page" bookmarklet
<html><body>
<h1>Shopify "Edit this page" bookmarklet</h1>
<p>Lets you quickly edit any product, page or collection in your Shopify store:</p>
<p><a href="javascript:(function()%7Bvar url %3D 'https%3A%2F%2F' %2B document.domain %2B '%2Fadmin%2F' %2B __st.p %2B 's%2F' %2B __st.rid%3Bwindow.open(url%2C '_blank')%7D)()">Shopify Edit</a> <- Drag this link to your bookmarks bar.</p>
<p>Then visit your Shopify store, go to a page/collection/product/blog post (doesn't work on homepage), and click the new button in your bookmark bar.</p>
<h1>Shopify "Search Orders" bookmarklet</h1>
<p>Lets you quickly find orders in your Shopify store. Please note, if you are not a <a href="https://www.repeaterstore.com">RepeaterStore</a> employee, you'll need to replace your shopify domain in the code below.</p>
<p><a href="javascript:(function()%7Bvar%20search%20%3D%20prompt('Enter%20your%20search%20term')%3Bif%20(search%20!%3D%20null)%20%7Bwindow.open('https%3A%2F%2Frepeaterstore.myshopify.com%2Fadmin%2Forders%
if 'createTouch' of document
ignore = /:hover\b/
try
for stylesheet in document.styleSheets
idxsToDelete = []
# detect hover rules
for rule, idx in stylesheet.cssRules
if rule.type is CSSRule.STYLE_RULE and ignore.test(rule.selectorText)
newSelector = _.reject rule.selectorText.split(","), (s) -> ignore.test s
if newSelector.length > 0