Skip to content

Instantly share code, notes, and snippets.

Avatar

Sina Khanifar sinak

View GitHub Profile
View gist:4ab4a0f5e79d01e5d139
{% paginate collections.all.products by 1000 %}
{% if pass_product_handle and collections["all"] %}
{% assign the_collection = collections["all"] %}
{% for product in the_collection.products offset: 0 %}
{% if pass_product_handle == product.handle %}
{% assign return = product %}
{% endif %}
{% endfor %}
{% endif %}
View gist:10fc78b5bb0ac8229f02
Set 1
- "Abortion / Family Planning"
- "Agriculture"
- "Animal Welfare"
- "Banking / Finance"
- "Business"
- "Defense"
- "Education"
- "Energy"
- "Environment"
View gist:0050ae57d02df85f3503
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
@sinak
sinak / gist:5c8bcc06ab4f6cffbe72
Last active Apr 28, 2021
Shopify "Edit this page" bookmarklet
View gist:5c8bcc06ab4f6cffbe72
<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%
View keybase.md

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:

View gist:9108433
[
{
"country" : "AF",
"count" : 954
},
{
"country" : "US",
"count" : 5197
},
{
View gist:8931483
'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': {
View gist:8931395
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/'
},
View gist:8931385
'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
View gist:8274699
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