Skip to content

Instantly share code, notes, and snippets.

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

Carlos Abdalla abdalla

🏠
Working from home
View GitHub Profile
@abdalla
abdalla / singleton.js
Created February 3, 2021 14:07
Singleton - Pattern
"use strict";
var Singleton = (function () {
function ProcessManager() {
this.numProcess = 0;
}
var processManager = undefined;
var createProcessManager = function createProcessManager() {
processManager = new ProcessManager();
@abdalla
abdalla / factory-pattern.js
Last active February 3, 2021 13:59
Factory Pattern
"use strict";
function Developer(name) {
this.name = name;
this.type = "Developer";
}
function Tester(name) {
this.name = name;
this.type = "Tester";
@abdalla
abdalla / routes.js
Created January 23, 2019 14:32
MODAFOCA
import React, { Component, PureComponent } from 'react';
import {
createStackNavigator,
createBottomTabNavigator
} from 'react-navigation';
import { Image, View, Text } from 'react-native';
import { Actions, Scene, Router } from 'react-native-router-flux';
import Icon from 'react-native-vector-icons/FontAwesome';
import colors from './src/constants/colors';
@abdalla
abdalla / v8.md
Created July 5, 2017 00:44 — forked from kevincennis/v8.md
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • sudo nano ~/.bash_profile
    • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
@abdalla
abdalla / Tutorial - docker-compose.yml
Created May 8, 2017 21:53
Tutorial - docker-compose.yml
version: '3'
services:
abdalla:
build: .
container_name: nodjs-test
image: abdalla/nodejs
volumes:
- .:/src
tty: true
@abdalla
abdalla / Dockerfile
Created May 5, 2017 22:28
Tutorial - Dockerfile
FROM fedora
RUN yum update -y
RUN yum install -y nodejs
RUN mkdir -p /src && cd /src
WORKDIR /src
@abdalla
abdalla / Sublime-Settings
Created May 5, 2017 13:24
Abdalla-Sublime-Settings
{
"bold_folder_labels": false,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 3,
"caret_style": "smooth",
"color_scheme": "Packages/ayu/ayu-mirage.tmTheme",
"font_face": "Courier New",
"font_size": 13,
"highlight_line": true,
@abdalla
abdalla / enjoy
Created March 23, 2017 16:56
enjoy
const typesOfCoins = [25, 10, 5, 1];
const exchange = vl => {
let exchanges = [];
typesOfCoins.reduce((cur, next) => {
const val = Math.floor(cur/next);
const rest = cur - (val * next);
exchanges.push(val);
@abdalla
abdalla / for_fun
Created March 23, 2017 16:43
for_fun
const exchange = vl => {
const nr_qt = Math.floor(vl/25);
console.log(nr_qt);
let rest = vl - (nr_qt * 25);
const nr_dim = Math.floor(rest/10);
console.log(nr_dim);
rest -= nr_dim * 10;
<Router>
<Route path="/" component={App}>
<IndexRoute component={Lander} />
<Route path="com/:opco/signin" component={SignIn} />
<Route path="com/:opco/search/colors" component={SearchPatternColorView} onEnter={onEnter} function="ViewFabric" />
<Route path="com/:opco/pattern/:patternID" component={MaintainPattern} onEnter={onEnter} function="ViewFabric" />
<Route path="com/:opco/pattern/:patternID/color/:colorID" component={MaintainColor} onEnter={onEnter} function="ViewFabric" />
<Route path="com/:opco" component={sendAdobeAnalyticsPageInformation(RequestLoggedIn, 'com request')} onEnter={onEnter} function="ViewFabric" />
<Route path="com/:opco/admin-dashboard" component={ComAdminDashboard} onEnter={onEnter} function="EditAdminDashboard" />
<Route path="com/:opco/user-dashboard" component={sendAdobeAnalyticsPageInformation(ComUserDashboard, 'view my com')} onEnter={onEnter} function="ViewMyRequestsDashboard" />