Skip to content

Instantly share code, notes, and snippets.

View ldco2016's full-sized avatar
🏠
Working from home

Daniel Cortes ldco2016

🏠
Working from home
  • Jacksonville, TX
View GitHub Profile
@ldco2016
ldco2016 / QM.namespace.ts
Created November 9, 2022 18:04
a query management system
/* eslint-disable max-len */
declare namespace V2QMM {}
declare namespace V2QMM.TYPES {
/**
* Place holder for ISO DateTime strings. When we can properly extend primitives for custom "brand" types, this should be able to validate
* as formatted `yyyy-MM-DD'T'hh:mm:ss'Z"`
*/
export type ISODateTime = string;
/**
@ldco2016
ldco2016 / loginActions.js
Created August 2, 2019 16:48
login Actions file
import {Alert} from 'react-native';
import logger from 'logger';
import * as types from 'auth/constants';
import * as endpoints from 'endpoints';
import * as cache from 'utils/cache';
import {AUTH_STATUS} from 'enums/authStatus';
import * as requester from 'services/Requester';
import {clearSurveys} from 'surveys-ballots/actions';
import {clearEvents} from 'events/actions';
import * as repsActions from 'representatives/actions';
@ldco2016
ldco2016 / javascript.md
Last active November 8, 2021 07:16
JavaScript: variables (ES6), arrays, conditionals, and loops

Create a Variable: Const

Let's dive in and see a variable in the wild. Here is how you declare a constant variable:

const myName = 'Arya';
console.log(myName);
// Output: Arya

Let's consider the above example:

@ldco2016
ldco2016 / caesar-cipher.js
Created November 12, 2017 18:26 — forked from primaryobjects/caesar-cipher.js
Caesar Cipher algorithm, encrypt string wrap back around to letters
process.stdin.resume();
process.stdin.setEncoding('ascii');
var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;
process.stdin.on('data', function (data) {
input_stdin += data;
});
import React from 'react';
import {View, Text, TouchableOpacity, SafeAreaView} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import {ScaledSheet} from 'react-native-size-matters';
import {
v2Colors,
v2Fonts,
v2InputsPropertiesBlack,
v2ButtonStyles,
} from 'theme';
@ldco2016
ldco2016 / cloudSettings
Last active October 13, 2019 03:18
the Login component inside of src/auth/screens/Login.js
{"lastUpload":"2019-10-13T03:18:30.028Z","extensionVersion":"v3.4.3"}
@ldco2016
ldco2016 / Signup.js
Last active September 26, 2019 22:27
file to be worked on
import React, { Component } from "react";
import { reduxForm, Field } from "redux-form";
class Signup extends Component {
// bonus
// by making method below an arrow function
// developer does not have to worry
// about binding the context of onSubmit
// saves having to call bind(this) somewhere
@ldco2016
ldco2016 / build.js
Created September 9, 2019 22:23
build script for generating apks and ipas
import fs from "fs-extra";
import eachSeries from "async/eachSeries";
import { exec } from "child_process";
import { androidDirectory } from "../../app.json";
import { resolveFromRoot, distDir, createLogger } from "../build";
const logger = createLogger("android");
const APK_PATTERN = /release\.apk$/i;
@ldco2016
ldco2016 / Podfile
Created September 6, 2019 16:27
podfile for multi-target project
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
abstract_target 'defaults' do
# Pods for NFIBEngage
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
@ldco2016
ldco2016 / RootNavigation.js
Created September 5, 2019 17:12
appCenter code
/* eslint react/forbid-prop-types: "off"*/
import React, { PureComponent } from "react";
import { AppState } from "react-native";
import DrawerStack from "./DrawerStack";
import AuthStack from "./auth/stack";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { NavigationActions } from "react-navigation";
import * as cache from "utils/cache";
import { AUTH_STATUS } from "../enums/authStatus";