Skip to content

Instantly share code, notes, and snippets.


Martin martinKindall

View GitHub Profile
cb372 /
Last active March 29, 2023 17:43
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.

helephant / !
Last active January 19, 2023 15:49
Calling a lambda in another AWS account by assuming a cross-account IAM role
View !

Set up a cross-account IAM role in the destination account

  • Add a new IAM role
  • For type of trusted entity select "another AWS account"
  • Specify the accountId of the account that will be using the resource in the destination account. You can find your AWS Account ID, which is available on the support homepage when you are logged in.
  • Create a policy that allows lambda:InvokeFunction for your function and attach it to this new role.

Create a lambda in the calling account.

  • Set up a role for your lambda that is allowed to assumeRole
  • Use the AWS SDK to assume the new role in the destination account.
  • Pass the credentials to the lambda object when you create it
codediodeio / database.rules.json
Last active March 25, 2023 06:59
Common Database Rules for Firebase
View database.rules.json
// No Security
"rules": {
".read": true,
".write": true
medhdj / CustomSpinner
Created December 29, 2014 19:59
A custom Spinner with opened and closed event, you can use it to perform some UI changes on the Spinner for example
View CustomSpinner
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Spinner;
public class CustomSpinner extends Spinner {
// private static final String TAG = "CustomSpinner";
private OnSpinnerEventsListener mListener;
private boolean mOpenInitiated = false;