Skip to content

Instantly share code, notes, and snippets.

View michaelnagy's full-sized avatar

Michael Nagy michaelnagy

  • https://traact.com
  • Ribeirao Preto - Brazil
View GitHub Profile
let radio = []
for (var prop in allusers) {
let i = 0
if (allusers[prop].oid === uid ) {
radio[i] =
<TableRow>
<TableRowColumn style={ajusteA}>{allusers[prop].date}</TableRowColumn>
<TableRowColumn>{allusers[prop].message}</TableRowColumn>
<TableRowColumn>{allusers[prop].type}</TableRowColumn>
@michaelnagy
michaelnagy / hasEmptyProperty.js
Created June 28, 2017 16:59
Check if an object has empty properties and return the first empty property
function hasEmptyProperty(values) {
for (var key in values) {
return true && key
}
}
@michaelnagy
michaelnagy / pokemon_scraper_crawler.js
Last active June 25, 2017 13:52
A simple node.js script to crawl and download information and images from pokeapi and pokemondb.net
// Nodejs > 7 or some babel is required cause we use ES7 syntax here (arrow functions and async await)
// This script requires node-fetch and image-downloader packages in order to work
// get it in npm:
// npm install --save image-downloader node-fetch
const download = require('image-downloader')
const fetch = require('node-fetch')
// We are doing a for loop to get info for the first 152 pokemons
for (var i = 1; i < 153; i++){
const asyncDownload = async () => {
try {
$TTL 604800
@ IN SOA 104.131.167.171. root.104.131.167.171. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS 104.131.167.171.
@ IN A 104.131.167.171
var ImagePicker = require('react-native-image-picker');
// More info on all the options is below in the README...just some common use cases shown here
var options = {
title: 'Alterar Perfil',
cancelButtonTitle:'Cancelar',
takePhotoButtonTitle:'Tirar foto',
chooseFromLibraryButtonTitle:'Escolher foto',
storageOptions: {
skipBackup: true
signup = async (email, pass) => {
try {
result = await firebase.auth()
.createUserWithEmailAndPassword(email, pass);
console.log(result.email);
}
catch (error) {
console.log(error.toString());
@michaelnagy
michaelnagy / gridhedge-calgo.sln
Last active January 26, 2017 18:44
cAlgo grid hedge bot
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
Verifying that "michaelnagy.id" is my Blockstack ID. https://onename.com/michaelnagy
//New Itens Biolab 5 Cards
4673,Minstrel_Alphoccio_Card,Minstrel Alphoccio Card,6,20,,10,,,,,,,,4,,,,,{if(BaseLevel == 175) bonus bAllStats,10; if(getrefine() >= 10) bonus bAllStats,10; if(BaseJob == Job_Minstrel || BaseJob == Job_Minstrel_T) { bonus bMaxHPrate,15; bonus bMaxSPrate,15; } autobonus2 "{ bonus bBaseAtk,100; transform 3245,3000; }",30*isequipped(4696),6000,BF_WEAPON,"{ specialeffect2 EF_FIRESPLASHHIT;}"},{},{};
4674,Guillotine_Cross_Eremes_Card,Guillotine Cross Eremes Card,6,20,,10,,,,,,,,4,,,,,{if(BaseLevel == 175) bonus bAllStats,10; if(getrefine() >= 10) bonus bAllStats,10; if(BaseJob == Job_Guillotine_Cross || BaseJob == Job_Guillotine_Cross_T) { bonus bFlee2,10; bonus bAtkRate,15; } autobonus2 "{ bonus bBaseAtk,100; transform 3220,3000; }",30*isequipped(4684),6000,BF_WEAPON,"{ specialeffect2 EF_FIRESPLASHHIT; }";},{},{};
4675,Arch_Bishop_Magaleta_Card,Arch Bishop Magaleta Card,6,20,,10,,,,,,,,4,,,,,{if(BaseLevel == 175) bonus bAllStats,10; if(getrefine() >= 10) bonus bAllStats,10; if(BaseJob
client.getEntries()
.then(function (entries) {
// getting all the entries in a global var
content = entries;
entries.items.forEach(function (entry, index) {
if (entry.sys.contentType.sys.id == 'event') {
//separating the events type entries in a global var
events[index] = entry;
console.log(entry.fields.image.fields.file.url); // this shows me undefined on console.log