Skip to content

Instantly share code, notes, and snippets.

View hithacker's full-sized avatar

Hiren Thacker hithacker

  • Napses Technologies
  • Goa
  • 00:01 (UTC +05:30)
  • X @hithacker
View GitHub Profile
@hithacker
hithacker / questionSchema.js
Created September 14, 2023 10:31
Question Schema
const schema = {
"categories": [
{
"id": 1,
"label": "Help us access the intensity of your situation"
},
{
"id": 2,
"label": "Help us access your gut sensitivity"
},
#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
nvm_has() {
type "$1" > /dev/null 2>&1
}
nvm_echo() {
command printf %s\\n "$*" 2>/dev/null
@hithacker
hithacker / sample-api-spec.txt
Created February 15, 2023 09:09
sample api spec
API for company
- Get all companies (also allow searching by name)
- Get company by id
- Create company
- Update company by id
- Delete company by id
- API for users
- Create user in a company
- Req params: company id, name, emailId, countryCode, mobileNumber
open_lmis=# select * from fulfillment.shipment_line_items where shipmentid = 'c649bfd1-fcb7-4f30-af6e-2e4ddfa45608';
id | orderableid | lotid | quantityshipped | shipmentid | extradata | orderableversionnumber
--------------------------------------+--------------------------------------+--------------------------------------+-----------------+--------------------------------------+-----------+------------------------
29a4186c-fc9f-4e3d-b990-ab49d8936a62 | fb6506d3-2390-4abc-89c6-092ad5b1aa9f | 00000000-0000-0000-0000-000000000000 | 10 | c649bfd1-fcb7-4f30-af6e-2e4ddfa45608 | null | 5
ac314647-e865-4bce-be8d-61a137b41792 | 29c65dde-0059-4a0b-a875-7942479a7625 | 00000000-0000-0000-0000-000000000000 | 1 | c649bfd1-fcb7-4f30-af6e-2e4ddfa45608 | null | 8
{
"order": {
"id": "b0fc602b-a121-4f07-8bf5-a0720eb13c09"
},
"lineItems": [
{
"lot": {
"id": "71d150df-c6d3-4298-ad70-53b3b7a4f5df"
},
"quantityShipped": 10,
@hithacker
hithacker / top20gainers.json
Created May 31, 2022 12:41
Truedata top 20 gainers
{
"status": "Success",
"Records": [
[
"PGEL",
100001167,
"2022-05-31T00:00:00",
786.95,
909.0,
780.0,
@hithacker
hithacker / corp_events.json
Created May 25, 2022 10:12
corporate events contract
{
"agm": [
{
"co_name": "Arvind Ltd",
"co_code": 29.0,
"symbol": "ARVIND",
"isin": "INE034A01011",
"AnnouncementDate": "2021-07-23T00:00:00",
"GMdate": "2021-08-18T00:00:00",
"Purpose": "AGM",
('20MICRONS','21STCENMGM','3IINFOLTD','3MINDIA','3PLAND','426GS2023','563GS2026','5PAISA','610GS2031','619GS2034','63MOONS','667GS2035','667GS2050','676GS2061','695GS2061','699GA31','699GS2051','737GS2023','763GS2059','772GS2055','795GS2032','824GS2027','A2ZINFRA','AAKASH','AAREYDRUGS','AARON','AARTIDRUGS','AARTIIND','AARTISURF','AARVEEDEN','AARVI','AAVAS','ABAN','ABB','ABBOTINDIA','ABCAPITAL','ABCOTS','ABFRL','ABINFRA','ABMINTLLTD','ABSLAMC','ABSLBANETF','ABSLNN50ET','ACC','ACCELYA','ACCORD','ACCURACY','ACE','ACEINTEG','ACRYSIL','ADANIENT','ADANIGREEN','ADANIPORTS','ADANIPOWER','ADANITRANS','ADFFOODS','ADL','ADORWELD','ADROITINFO','ADSL','ADVANIHOTR','ADVENZYMES','AEGISCHEM','AFFLE','AGARIND','AGRITECH','AGROPHOS','AGSTRA','AHLADA','AHLEAST','AHLUCONT','AHLWEST','AIAENG','AIRAN','AIROLAM','AIRTELPP','AISL','AJANTPHARM','AJMERA','AJOONI','AJRINFRA','AKASH','AKG','AKSHARCHEM','AKSHOPTFBR','AKZOINDIA','ALANKIT','ALBERTDAVD','ALEMBICLTD','ALICON','ALKALI','ALKEM','ALKYLAMINE','ALLCARGO','ALLSEC','ALMONDZ','ALOKI
({params, imports}) => {
const workLists = params.workLists;
const context = params.context;
const RuleCondition = imports.rulesConfig.RuleCondition;
const WorkItem = imports.models.WorkItem;
const needsAssessment = (workLists) => {
const enrolToMotherProgram = () => workLists.addItemsToCurrentWorkList(
new WorkItem("31af5921-368f-4cbd-a830-40f38d1c73c3",
WorkItem.type.PROGRAM_ENROLMENT,
{
"push": [
{
"entity": "Video",
"todo": 0,
"done": 0
},
{
"entity": "ChecklistItemDetail",
"todo": 0,