A very simple zkApp that allows user to deposit and withdraw. Run it with
node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads node_modules/jest/bin/jest.js -- fakemac.test.ts
A very simple zkApp that allows user to deposit and withdraw. Run it with
node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads node_modules/jest/bin/jest.js -- fakemac.test.ts
// Navigate to https://github.com/watching and then run: | |
// Taken from: https://stackoverflow.com/questions/11043374/how-to-unwatch-multiple-repos-easily-on-github | |
Array.prototype | |
.slice.apply(document.querySelectorAll('.js-subscription-row')) | |
.forEach(el => { const org = el.querySelector('a[href^="/YOUR_ORG"]'); if (org) el.querySelector('button').click()}); |
gem 'stackprof', require: false | |
gem 'ruby-prof', require: false |
The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.
First the simplest/core layers, then optional layers depending on which features/functionality you want.
Specs |
|
---|---|
AUTHOR | Ira Herman |
LANGUAGE/STACK | Ruby on Rails Version 4, 5, or 6 |
#!/usr/bin/env bash | |
function __tc_encode { | |
# Only unicode characters are not supported | |
echo -n "$1" | sed "s/\([|']\)/\|\1/g; s/\[/\|\[/g; s/\]/\|\]/g; s/\r/\|r/g;" | sed ':a;N;$!ba;s/\n/|n/g' | |
} | |
function __tc_message { | |
echo "##teamcity[message text='$(__tc_encode "$2")' status='${1:-NORMAL}']" | |
} | |
function __tc_simple { |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git
React Hook | Ember Hook | Server? | Initial Render? | Rerender? | Purpose |
---|---|---|---|---|---|
componentWillMount |
init |
Yes | Yes | No | Set initial component state without triggering re-render |
componentDidMount |
didInsertElement |
No | Yes | No | Provides opportunity for manual DOM manipulation |
componentWillReceiveProps |
willReceiveAttrs |
No | No | Yes | React to changes in component attributes, so that setState can be invoked before render |
shouldComponentUpdate |
Maybe N/A | No | No | Yes | Gives a component an opportunity to reject downstream revalidation |
componentWillUpdate |
willUpdate |
No | No | Yes | Invoked before a template is re-rendered to give the component an opportunity to inspect the DOM before updates have been applied (example) |
componentDidUpdate |
didUpdate |
No | No | Yes | Invoked after a template is r |
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
This method does not add your OAuth token to Gemfile.lock
. It uses bundle config to store your credentials, and allows you to configure Heroku to use environment variables when deploying.