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
import base64 | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives.asymmetric import ec as cryptography_ec | |
from cryptography.hazmat.primitives.asymmetric.utils import encode_dss_signature | |
from cryptography.hazmat.primitives.hashes import SHA384 | |
from cryptography.hazmat.primitives.serialization import load_pem_public_key | |
import ecdsa.util | |
import ecdsa.curves | |
import fastecdsa.ecdsa | |
from fastecdsa.encoding.der import DEREncoder |
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
/* @flow */ | |
export type ActionType = "hello"; | |
export function action(): ActionType { | |
return "hello"; | |
} |
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
diff --git a/kinto/core/storage/postgresql/migrations/migration_019_hotfix.sql b/kinto/core/storage/postgresql/migrations/migration_019_hotfix.sql | |
index 1795b55a..bab9234d 100644 | |
--- a/kinto/core/storage/postgresql/migrations/migration_019_hotfix.sql | |
+++ b/kinto/core/storage/postgresql/migrations/migration_019_hotfix.sql | |
@@ -5,29 +5,36 @@ RETURNS trigger AS $$ | |
DECLARE | |
previous TIMESTAMP; | |
current TIMESTAMP; | |
+ is_bucket BOOLEAN; | |
BEGIN |
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
Show hidden characters
{ | |
"env": { | |
"development": { | |
"plugins": [ | |
["transform-builtin-extend", { | |
"globals": ["Error"] | |
}], | |
"transform-runtime", | |
"transform-es2015-classes", | |
"transform-es2015-modules-commonjs" |
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
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module SumAll.Eureka.Types ( | |
EitherStyleListeners(..), | |
) where | |
import Canteven.Listen.HTTP (ListenerConfig, | |
ListenHTTPConfig(ListenHTTPConfig), otherthing, moyonthetnh) | |
import qualified Canteven.Listen.HTTP as CLH (ListenHTTPConfig(listeners)) |
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
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-} | |
import Database.MongoDB | |
import Control.Exception | |
import Control.Monad.Trans (liftIO) | |
main = do | |
pipe <- connect (host "127.0.0.1") | |
e1 <- access pipe master "baseball" badQuery `catch` recover | |
e2 <- access pipe master "baseball" goodQuery | |
close pipe |
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
import Control.Concurrent | |
import Control.Concurrent.STM | |
import Control.Monad | |
import Network.HTTP.Client | |
import Network.HTTP.Client.TLS | |
numThreads = 250 | |
main = do | |
manager <- newManager tlsManagerSettings {managerConnCount=1000} |
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
370,542,843,752 bytes allocated in the heap | |
148,840,615,752 bytes copied during GC | |
846,536,984 bytes maximum residency (2404 sample(s)) | |
109,145,520 bytes maximum slop | |
2159 MB total memory in use (1109 MB lost due to fragmentation) | |
Tot time (elapsed) Avg pause Max pause | |
Gen 0 502428 colls, 0 par 72.80s 73.09s 0.0001s 0.0261s | |
Gen 1 2404 colls, 0 par 281.63s 282.21s 0.1174s 0.1935s |
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
ethan@thunder:~/Jobs/SumAll/haskell-twitter-worker:upgrade-aes$ openssl s_client -msg -connect kinesis.us-east-1.amazonaws.com:443 | |
CONNECTED(00000003) | |
>>> TLS 1.2 Handshake [length 012c], ClientHello | |
01 00 01 28 03 03 e7 19 0d 06 97 c4 cb bb 7e f0 | |
d7 ed c8 ed 59 ea 28 db f9 4a 4e bd 35 7d 0b 62 | |
fc b7 d1 a9 b7 bc 00 00 92 c0 30 c0 2c c0 28 c0 | |
24 c0 14 c0 0a 00 a3 00 9f 00 6b 00 6a 00 39 00 | |
38 00 88 00 87 c0 32 c0 2e c0 2a c0 26 c0 0f c0 | |
05 00 9d 00 3d 00 35 00 84 c0 12 c0 08 00 16 00 | |
13 c0 0d c0 03 00 0a c0 2f c0 2b c0 27 c0 23 c0 |
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
public String generateKey(String id) { | |
// this should be unique: userId + currentTime + 5 digit random number | |
return Base62Converter.encodeString(id + "-" + | |
String.valueOf(System.currentTimeMillis()) + "-" + | |
RandomStringUtils.randomAlphanumeric(5)); | |
} |
NewerOlder