This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { API_URL } from 'react-native-dotenv' | |
import graphql from 'graphql-client' | |
const LOGIN_URL = API_URL + "/accounts/login?provider=local" | |
const SIGNUP_URL = API_URL + "/accounts/signup" | |
const TIMEOUT = 5000 | |
//user = { nickname (or email), password } | |
const login = (user) => { | |
const userData = { password: user.password } | |
if(/@/.test(user.nickname)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use mtgmp; | |
db.cards.insertMany([{"name":"Angel","image":"http://tokens.mtg.onl/tokens/SOI_001-Angel.jpg","createdAt":1502889414929,"deleted":false,"token":true},{"name":"Human Soldier","image":"http://tokens.mtg.onl/tokens/SOI_002-Human-Soldier.jpg","createdAt":1502889414929,"deleted":false,"token":true},{"name":"Spirit","image":"http://tokens.mtg.onl/tokens/SOI_003-Spirit.jpg","createdAt":1502889414929,"deleted":false,"token":true},{"name":"Vampire Knight","image":"http://tokens.mtg.onl/tokens/SOI_004-Vampire-Knight.jpg","createdAt":1502889414929,"deleted":false,"token":true},{"name":"Zombie","image":"http://tokens.mtg.onl/tokens/SOI_005-Zombie.jpg","createdAt":1502889414929,"deleted":false,"token":true},{"name":"Devil","image":"http://tokens.mtg.onl/tokens/SOI_006-Devil.jpg","createdAt":1502889414929,"deleted":false,"token":true},{"name":"Insect","image":"http://tokens.mtg.onl/tokens/SOI_007-Insect.jpg","createdAt":1502889414929,"deleted":false,"token":true},{"name":"Ooze","image":"http://tokens.mtg.onl/tok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const os = require('os-utils'); | |
const exec = require("child_process").exec; | |
const DEFAULT_INTERVAL_CHECK = 1000 | |
const DEFAULT_MAX_CPU_USAGE = 80 | |
const RESTART_COMMAND = "pm2 restart all" | |
const DEFAULT_MINIMUM_MEMORY = 200 | |
let maxCpuUsage = DEFAULT_MAX_CPU_USAGE | |
let intervalCheck = DEFAULT_INTERVAL_CHECK | |
let minimumMemory = DEFAULT_MINIMUM_MEMORY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function htmlToArray(htmlString, elementString){ | |
const regexp = new RegExp("<"+ elementString +">([^<>]+)<\/"+ elementString +">", 'g') | |
let m | |
let result = [] | |
do{ | |
m = regexp.exec(htmlString) | |
if(m && m.length >= 2) | |
result.push(m[1]) | |
} while(m) | |
return result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class MoveCrazy : MonoBehaviour { | |
public Transform finalPosition; | |
public float speed = 1f; | |
public bool slerp = true; | |
public Text debug; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fill out your copyright notice in the Description page of Project Settings. | |
#include "FloorTile.h" | |
#include "Components/ArrowComponent.h" | |
#include "Components/BoxComponent.h" | |
#include "Components/SceneComponent.h" | |
#include "Components/StaticMeshComponent.h" | |
#include "Runtime/Engine/Classes/Engine/World.h" | |
#include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h" | |
#include "Runtime/Engine/Classes/Materials/MaterialInterface.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. | |
using UnrealBuildTool; | |
public class StarTrix : ModuleRules | |
{ | |
public StarTrix(ReadOnlyTargetRules Target) : base(Target) | |
{ | |
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Arquivo Index.js */ | |
const express = require('express'); | |
const app = express(); | |
const http = require('http').Server(app); | |
const io = require('socket.io')(http); | |
const ArduinoControl = require('./arduino-control'); | |
app.use(express.static('public')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <AFMotor.h> | |
#define SPEED 255 | |
AF_DCMotor leftWheels(1); | |
AF_DCMotor rightWheels(2); | |
unsigned char serialData = 0x00; | |
void setup(){ | |
Serial.begin(9600); | |
setSpeed(); | |
} |