Instantly share code, notes, and snippets.

🐌
I love snails.

tanaydin sirin tanaydin

🐌
I love snails.
• Amsterdam
Created July 18, 2018 15:26 — forked from bellbind/ecc.py
[python]basics of elliptic curve cryptography
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 # Basics of Elliptic Curve Cryptography implementation on Python import collections def inv(n, q): """div on PN modulo a/b mod q as a * inv(b, q) mod q >>> assert n * inv(n, q) % q == 1 """ for i in range(q): if (n * i) % q == 1:
Created September 20, 2016 14:49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 def is_balanced(s): p = [] for l in s: if l == '(': p.append(l) elif l == ')': if not p: return False else: p.pop()
Created January 23, 2016 12:43 — forked from cklanac/Javascript OO Cheat Sheet
Javascript OO Cheat Sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 /*********************************************************************************************************************** *********************************************************************************************************************** * CONTENTS: * Native Object * Object Literal * Basic Object * Psuedo-Class * Self Executing/Invoking Structure * Lazy Function * Module Pattern
Created October 13, 2015 08:37 — forked from yyalim/locale_for_digital_ocean_ubuntu.sh
Install charset for debian variants.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 # thanks to tanaydin < github.com/tanaydin > # set locales for system export LANGUAGE="en_US:en" export LC_ALL="en_US.UTF-8" sudo locale-gen en.UTF-8 sudo dpkg-reconfigure locales echo "LANGUAGE=\"en_US:en\"" | sudo tee --append /etc/default/locale echo "LC_ALL=\"en_US.UTF-8\"" | sudo tee --append /etc/default/locale
Created October 5, 2015 06:56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 Verifying that +tanaydin is my blockchain ID. https://onename.com/tanaydin
Last active May 30, 2017 22:38 — forked from kelvinn/cmd.sh
Example of using Apache Bench (ab) to POST JSON to an API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 # post_loc.txt contains the json you want to post # -p means to POST it # -H adds an Auth header (could be Basic or Token) # -T sets the Content-Type # -c is concurrent clients # -n is the number of requests to run in the test ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
Last active August 29, 2015 14:28 — forked from omarstreak/background.js
Chrome API Extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters