Skip to content

Instantly share code, notes, and snippets.

View santhosh-chinnasamy's full-sized avatar

Santhosh C santhosh-chinnasamy

View GitHub Profile
import React, { useState } from "react";
import { useMutation, useQueryClient } from "react-query";
import axios from "axios";
const gender = ["male", "female"];
const status = ["active", "inactive"];
const random = (array) => array[Math.floor(Math.random() * array.length)];
export default function User() {
const [name, setName] = useState("");
@santhosh-chinnasamy
santhosh-chinnasamy / activity_constant.js
Created September 3, 2021 06:55
activity constants
module.exports = {
USER: 'user',
DEPARTMENT: 'department',
DESIGNATION: 'designation',
REPORTING_MANAGER: 'reportingManager',
MODERATOR: 'moderator',
CUSTOMER: 'customer',
VENDOR: 'vendor',
EXPENSE: 'expense',
PRODUCT: 'product',
@santhosh-chinnasamy
santhosh-chinnasamy / rails http status codes
Created June 9, 2020 17:21 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
// boolean
let isAvailable: boolean = true;
console.log(`${typeof isAvailable}: ${isAvailable}`);
// number
let decimal: number = 6;
let hex: number = 0xf00d;
let binary: number = 0b1010;
let octal: number = 0o744;
console.log(`decimal ${typeof decimal}: ${decimal} \t hex ${typeof hex}: ${hex} \t binary ${typeof binary}: ${binary} \t octal ${typeof octal}: ${octal}`);
let decimal: number = 15;
let hex: number = 0xf00d;
let binary: number = 0b1010;
let octal: number = 0o744;
let isAvailable: boolean = true;
@santhosh-chinnasamy
santhosh-chinnasamy / sample.scss
Last active January 1, 2019 05:37
sample scss file
$blue: #3bbfce;
.sample{
background-color: $blue;
}
@santhosh-chinnasamy
santhosh-chinnasamy / output.css
Last active January 1, 2019 05:34
samplse css file
.sample{
background-color: #3bbfce;
}
@santhosh-chinnasamy
santhosh-chinnasamy / vagrant.md
Last active December 6, 2018 08:25
vagrant/vbox related commands

list all Virtual machine

vboxmanage list vms
@santhosh-chinnasamy
santhosh-chinnasamy / adb_commands.md
Last active January 8, 2020 08:49
adb commands

To open urls from adb

adb shell am start -a android.intent.action.VIEW -d https://www.google.com/

To install an application

adb install -r appname.apk