Skip to content

Instantly share code, notes, and snippets.

Avatar
🌊
In Flow

Ashok Raju rajuashok

🌊
In Flow
View GitHub Profile
@rajuashok
rajuashok / xmldata.cs
Last active Nov 18, 2021
Example XML data
View xmldata.cs
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'>
";
View Login.tsx
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 Nov 5, 2021
install chakra ui using zsh
View chakra-ui.zsh
npm i "@chakra-ui/react" "@emotion/react@^11" "@emotion/styled@^11" "framer-motion@^4"
View actionFooterView.swift
//
// 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
CURL applications/get-form
View 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 Mar 26, 2020
Super Abstractions Branch Orbis Application Form
View orbis-form.json
{
"status": true,
"application_type": {
"id": 31,
"pages": [
{
"id": 79,
"position": 1,
"sections": [
{
@rajuashok
rajuashok / portfolio-db-v2.ts
Last active Jan 22, 2020
Portfolio Positions Orders Trades
View portfolio-db-v2.ts
interface Trade {
id: string
security: Security
strategy: Strategy
legs: Legs[]
}
interface TradePosition {
id: string
portfolioId: string
@rajuashok
rajuashok / portfolio-db.ts
Last active Jan 22, 2020
Portfolio Positions Orders Trades
View portfolio-db.ts
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 Jan 14, 2020
OnClick example for single choice RadioButton group
View SingleChoiceOnClick.swift
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 Jan 14, 2020
OnClick example for single choice RadioButton group
View SingleChoiceOnClick.swift
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