Install the OpenSSL on Debian based systems
sudo apt-get install openssl
npx npm-check-updates -u --timeout 120000 | |
npm install |
Javascript | |
----------------- | |
https://github.com/systemjs/systemjs | |
SystemJS is a hookable, standards-based module loader. It provides a workflow where code written for production workflows of native ES modules in browsers (like Rollup code-splitting builds), can be transpiled to the System.register module format to work in older browsers that don't support native modules, running almost-native module speeds while supporting top-level await, dynamic import, circular references and live bindings, import.meta.url, module types, import maps, integrity and Content Security Policy with compatibility in older browsers back to IE11. |
Add this script in package.json | |
"android:linux": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android", | |
import React from 'react'; | |
import MyComponent from '../src/components/MyComponent'; | |
import { shallow, mount, render } from 'enzyme'; | |
import { configure } from 'enzyme'; | |
import Adapter from 'enzyme-adapter-react-16'; | |
configure({ adapter: new Adapter() }); | |
import { specs, describe, it } from 'storybook-addon-specifications' | |
import expect from "expect"; | |
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
docker run --rm -it -p 5433:5433 --add-host=localhost:192.168.1.2 -p 80:80/tcp myimage:latest | |
C:\Program Files\PostgreSQL\11\data\pg_hba.conf | |
host all all 172.17.0.1/16 md5 | |
host all all 192.168.1.2/32 md5 | |
C:\Program Files\PostgreSQL\11\data\postgresql.conf | |
listen_addresses = '*' |
Install nuget package "Microsoft.EntityFrameworkCore.Tools" in infrastructure project. | |
Run this in nuget console. | |
add-migration Initial -Context "XYZDbContext" -StartupProject ABC.XYZ.Web -Project ABC.XYZ.Infrastructure |
public static UserInfo GetClaimsFromToken(string accessTokenAsString) | |
{ | |
var tokenHandler = new JwtSecurityTokenHandler(); | |
if (!(tokenHandler.ReadToken(accessTokenAsString) is JwtSecurityToken accessToken)) return null; | |
var claims = accessToken.Claims.ToList(); | |
var userId =claims.First(c => c.Type == "id").Value; // These could be different for your case | |
var tenantId = claims.First(c => c.Type == "tenant_id").Value; | |
return new UserInfo() |
openssl pkcs12 -in MyCertificate.pfx -clcerts -nokeys -out MyCertificate.crt | |
openssl pkcs12 -in MyCertificate.pfx -nocerts -out MyCertificate-encrypted.key | |
openssl rsa -in MyCertificate-encrypted.key -out MyCertificate_unenc.key | |
openssl pkcs12 -export -out MyCertificate_np.pfx -inkey MyCertificate_unenc.key -in MyCertificate.crt -passout pass: |