For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
openjdk is keg-only, which means it was not symlinked into /usr/local,
because it shadows the macOS `java` wrapper.
If you need to have openjdk first in your PATH run:
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> /Users/Daniel/.bash_profile
This file contains hidden or 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
filepath = 'local-filepath' | |
url = 'web-url' | |
File.open(filepath, 'w') {|f| | |
block = proc { |response| | |
response.read_body do |chunk| | |
puts "Working on response" | |
f.write chunk | |
end | |
} | |
RestClient::Request.new(method: :get, url: url, block_response: block).execute |
Somewhat helpful link: https://developers.google.com/api-client-library/ruby/
Go to: https://console.developers.google.com/iam-admin/projects
Click "+Create Project"
Enter a "Project name" and "Project ID" and click "Create"
Under "Library" select "Calendar API"
Click ">Enable"
Return to: https://console.developers.google.com/iam-admin/projects
Click "Service Accounts"
- Uninstall and install
openssl
version 1.0.2. Asopenssl
v1.0.2 is no longer available, I have extractedopenssl
v1.0.2 and make it available at https://github.com/khun84/homebrew-repo/
brew uninstall --force --ignore-dependencies openssl
brew install khun84/homebrew-repo/openssl
brew cleanup # in case it fails due to permission denied, it can be due to the symlink to be removed is pointing to a non-exist file/directory. Just create the corresponding file or directory and run this command again
- After OpenSSL installation, check it using
pkg-config --libs openssl
. You should see something like-L/usr/local/Cellar/openssl/1.0.2t/lib -lssl -lcrypto
Steps:
- Provision snapshot instance with same production spec
- Create archived service match table in another namespace
- Export service matches that are to be archived (via pg_dump or copy) into flat file (to be performed using psql in one of the prod application instance)
- Load archived service matches from flat file into archive table (via pg_restore or copy)
- Hard delete service matches to be archived in production DB by using batch strategy
This file contains hidden or 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 pandas as pd | |
import folium | |
# edit this section to project the polygon that you want | |
pj_geojson = {"type":"Polygon","coordinates":[[[101.6637271,3.070996],[101.6637271,3.204971],[101.5526301,3.204971],[101.5526301,3.070996],[101.6637271,3.070996]]]} | |
subang_jaya = {"type":"Polygon","coordinates":[[[101.6210431,3.085025],[101.6210431,2.975538],[101.5493918,2.975538],[101.5493918,3.085025],[101.6210431,3.085025]]]} | |
langat = {"type":"Polygon","coordinates":[[[101.6828061,2.643176],[101.6828061,2.9793898],[101.2863841,2.9793898],[101.2863841,2.643176],[101.6828061,2.643176]]]} | |
boundary = pj_geojson['coordinates'][0] | |
boundary2 = subang_jaya['coordinates'][0] |
This file contains hidden or 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
require 'openssl' | |
key = OpenSSL::PKey::RSA.new(2048) | |
p encrypted_string = key.public_encrypt('my plaintext string', OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING) | |
p decrypted_string = key.private_decrypt(encrypted_string, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING) |
NewerOlder