Sample code to encrypt using Python and decrypt in Javascript
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
from sys import stdin, stdout, stderr | |
from optparse import OptionParser | |
from os import urandom | |
from hashlib import sha256 | |
from Crypto.Cipher import AES | |
from base64 import b64encode |
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
#!/bin/bash | |
#By installing the Amazon Inspector Agent, you agree that your use is | |
# subject to the terms of your existing AWS Customer Agreement or other | |
# agreement with Amazon Web Services, Inc. or its affiliates governing your | |
# use of AWS services. You may not install and use the | |
# Amazon Inspector Agent unless you have an account in good standing with AWS. | |
# Copyright 2016 Amazon Web Services, Inc. or its affiliates. All Rights Reserved. | |
# Licensed under the terms of your existing AWS Customer Agreement |
When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.
filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}"
Sometimes a python script will simply hang forever with no indication of where things went wrong. Perhaps it's polling a service that will never return a value that allows the program to move forward. Here's a way to see where the program is currently stuck.
Install gdb.
# Redhat, CentOS, etc
You can install previous versions of Ruby following this instructions posted on this RVM github issue: rvm/rvm#4680 (comment)
I did the same as @grhansen suggested. I was installing ruby 2.3 and that required libssl1.0-dev. I am using Ubuntu 19.04. So I opened my /etc/apt/sources.list by
sudo nano /etc/apt/sources.list
.
class String | |
def unindent | |
gsub(/^#{scan(/^\s*/).min_by{|l|l.length}}/, "") | |
end | |
end | |
def display | |
text = <<-TEXT.unindent | |
Lorem ipsum dolor sit amet, | |
consectetur adipisicing elit, |
# .style.yapf | |
# | |
# DESCRIPTION | |
# Configuration file for the python formatter yapf. | |
# | |
# This configuration is based on the generic | |
# configuration published on GitHub. | |
# | |
# AUTHOR | |
# krnd |
#!/usr/bin/env bash | |
## Copyright (C) 2017, Oleksandr Kucherenko | |
## Last revisit: 2017-09-29 | |
# For help: | |
# ./versionip.sh --help | |
# For developer / references: | |
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php | |
# http://tldp.org/LDP/abs/html/comparison-ops.html |