Skip to content

Instantly share code, notes, and snippets.

View rahulsivalenka's full-sized avatar

Phani Rahul Sivalenka rahulsivalenka

View GitHub Profile
@rahulsivalenka
rahulsivalenka / machine.js
Last active March 14, 2021 09:41
Generated by XState Viz: https://xstate.js.org/viz
const stepperMachine = Machine({
id: 'stepper',
initial: 'selectDecisionFlow',
states: {
'selectDecisionFlow': {
on: {
next: 'selectDataSource',
},
},
'selectDataSource': {
@rahulsivalenka
rahulsivalenka / machine.js
Last active March 14, 2021 08:13
Generated by XState Viz: https://xstate.js.org/viz
const confirmationDialogStateMachine = Machine({
id: 'confirmationDialog',
initial: 'none',
states: {
none: {
on: {
OPEN_SAVE_CONFIRMATION: 'saveConfirmation',
OPEN_DELETE_CONFIRMATION: 'deleteConfirmation',
}
},

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@rahulsivalenka
rahulsivalenka / callbacks.js
Created March 21, 2019 00:55 — forked from andrhamm/callbacks.js
Paginating Scans & Queries in DynamoDB with Node.js using Callbacks OR Promises
const AWS = require('aws-sdk');
AWS.config.logger = console;
const dynamodb = new AWS.DynamoDB({ apiVersion: '2012-08-10' });
let val = 'some value';
let params = {
TableName: "MyTable",
ExpressionAttributeValues: {
@rahulsivalenka
rahulsivalenka / imposter-handbook-links.md
Created February 7, 2018 06:05 — forked from milmazz/imposter-handbook-links.md
Useful links found in The Imposter's Handbook by Rob Conery
/* ----------------------------------------------------------------------------------------------------
Super Form Reset
A couple of things to watch out for:
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered.
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders.
- You NEED to set the font-size and family on all form elements
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs
@rahulsivalenka
rahulsivalenka / deep-comparision.js
Last active August 29, 2017 05:39
Functions which can be used to deep compare two objects or two arrays
let src = [{
a: 25,
b: 15
}, {
a: 10,
b: [10,15],
c: [{
x: 15,
y: 10
}],
@rahulsivalenka
rahulsivalenka / Update remote repo
Created July 15, 2017 05:36 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@rahulsivalenka
rahulsivalenka / BadgeTabLayout.java
Created December 22, 2016 21:49 — forked from eneim/BadgeTabLayout.java
A custom TabLayout with badge support for Tabs
package im.ene.lab.android.widgets;
import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.util.AttributeSet;