Skip to content

Instantly share code, notes, and snippets.

View rajuashok's full-sized avatar
🌊
In Flow

Ashok rajuashok

🌊
In Flow
View GitHub Profile
@rajuashok
rajuashok / xmldata.cs
Last active November 18, 2021 23:14
Example XML data
String XMLData = @"
<meta property='og:url' content='https://www.imdb.com/title/tt0120338/'>
<meta property='og:site_name' content='IMDb'>
<meta property='og:title' content='Titanic (1997) - IMDb'>
<meta property='og:description' content='Titanic: Directed by James Cameron. With Leonardo DiCaprio, Kate Winslet, Billy Zane, Kathy Bates. A seventeen-year-old aristocrat falls in love with a kind but poor artist aboard the luxurious, ill-fated R.M.S. Titanic.'>
<meta property='og:image' content='https://m.media-amazon.com/images/M/MV5BMDdmZGU3NDQtY2E5My00ZTliLWIzOTUtMTY4ZGI1YjdiNjk3XkEyXkFqcGdeQXVyNTA4NzY1MzY._V1_FMjpg_UX1000_.jpg'>
";
import { login } from '../lib/auth';
// The login function has the following signature:
// const login = async (email: string, password: string) => { ... }
export default function Login() {
return (
<div>
<Heading>Please login</Heading>
<input
@rajuashok
rajuashok / chakra-ui.zsh
Created November 5, 2021 22:51
install chakra ui using zsh
npm i "@chakra-ui/react" "@emotion/react@^11" "@emotion/styled@^11" "framer-motion@^4"
//
// ActionFooterView.swift
// Alpha
//
// Created by Ian Mendiola on 5/21/20.
// Copyright © 2020 Open Advisers LLC. All rights reserved.
//
import Foundation
import UIKit
@rajuashok
rajuashok / get-form
Created May 5, 2020 03:20
CURL applications/get-form
curl --request POST \ [ruby-2.6.3p62]
--url https://accounts-api.orbisfn.io/api/applications/get-form \
--header 'authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYWNjb3VudHMtYXBpLm9yYmlzZm4uaW9cL2FwaVwvYXV0aFwvcmVmcmVzaCIsImlhdCI6MTU4ODIwNTg0NCwiZXhwIjoxNTg4NjgxODE2LCJuYmYiOjE1ODg1OTU0MTYsImp0aSI6ImxKZmhhcnhSTzZhQmx5eFIiLCJzdWIiOjg2MjAsInBydiI6ImYzNzVlYWVkMGM2ZjE2YjJjOWUyYmY1NzE2YzUwMTZiNzUwZjI1NjcifQ.qhTVJKVLUEyRSDtMERnlA1vsgitSALiEjgY1JJw_akg' \
--header 'content-type: application/json' \
--cookie __cfduid=dc65b2cb0e4ddb3615ed1c1d458947ad51587688722 \
--data '{
"with": [
"pages.sections.questions.translations",
"pages.sections.questions.parent_questions.parent_question",
"pages.sections.questions.parent_questions.parent_
@rajuashok
rajuashok / orbis-form.json
Created March 26, 2020 18:31
Super Abstractions Branch Orbis Application Form
{
"status": true,
"application_type": {
"id": 31,
"pages": [
{
"id": 79,
"position": 1,
"sections": [
{
@rajuashok
rajuashok / portfolio-db-v2.ts
Last active January 22, 2020 19:07
Portfolio Positions Orders Trades
interface Trade {
id: string
security: Security
strategy: Strategy
legs: Legs[]
}
interface TradePosition {
id: string
portfolioId: string
@rajuashok
rajuashok / portfolio-db.ts
Last active January 22, 2020 19:07
Portfolio Positions Orders Trades
interface Trade {
id: string
security: Security
strategy: Strategy
legs: Legs[]
}
interface TradePosition {
id: string
portfolioId?: string // null until order FILLED
@rajuashok
rajuashok / SingleChoiceOnClick.swift
Created January 14, 2020 16:54
OnClick example for single choice RadioButton group
func onClick(_ sender: UIView) {
guard let currentRadioButton = sender as? RadioButton else {
return
}
[
radioButton1,
radioButton2
].forEach { $0.isChecked = false } // Set all to unchecked first
currentRadioButton.isChecked = !currentRadioButton.isChecked
@rajuashok
rajuashok / SingleChoiceOnClick.swift
Created January 14, 2020 16:54
OnClick example for single choice RadioButton group
func onClick(_ sender: UIView) {
guard let currentRadioButton = sender as? RadioButton else {
return
}
[
radioButton1,
radioButton2
].forEach { $0.isChecked = false } // Set all to unchecked first
currentRadioButton.isChecked = !currentRadioButton.isChecked