Skip to content

Instantly share code, notes, and snippets.

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

Lucas Michailian lmichailian

🏠
Working from home
View GitHub Profile
@lmichailian
lmichailian / mailgunlog.js
Last active June 2, 2020 13:24
(NODEJS) Script to log sent and accepted mails from mailgun
var exec = require('child_process').exec;
const util = require('util');
var args =
"-s --user 'APIKEY' -G \
https://api.mailgun.net/v3/DOMAIN/events \
--data-urlencode begin='DATE' \
--data-urlencode ascending=yes \
--data-urlencode limit=300 \
--data-urlencode pretty=yes \
import { SET_PASSWORD_VALIDATION, CLEAR_PASSWORD_VALIDATION } from '../actions/ui/password'
const passwordReducer = (state = {}, actions) => {
switch (actions.type) {
case CLEAR_PASSWORD_VALIDATION:
return {}
case SET_PASSWORD_VALIDATION:
const {value, user} = actions.payload
const notEmpty = value !== '' && value !== undefined
@lmichailian
lmichailian / RockerCoin.sol
Created May 2, 2020 21:39
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.17+commit.d19bba13.js&optimize=false&gist=
pragma solidity ^0.5.0;
contract RockerCoin {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
@lmichailian
lmichailian / logger.js
Created February 28, 2018 14:00 — forked from mariano-aguero/logger.js
Papertrail Winston
'use strict';
/* global __base */
let winston = require('winston'),
path = require('path'),
utils = require(__base + 'app/helpers/utils'),
util = require('util');
//winston logging for papertrail
require('winston-papertrail').Papertrail;
@lmichailian
lmichailian / DeviceForm.js
Created February 20, 2018 20:32 — forked from maotora/DeviceForm.js
Intergrating native-base styled components & redux-form.
import React, { Component } from 'react';
import { Grid, Col, Row } from 'react-native-easy-grid';
import * as renders from './renderedComponents';
import { Field, reduxForm } from 'redux-form';
import normalizePhone from './normalizePhone';
import { createRouter, withNavigation } from '@exponent/ex-navigation';
import {
Container,
Header,
Title,
<?php
class PostController
{
public function index()
{
return Post::all();
}
}
@lmichailian
lmichailian / complex.php
Created July 24, 2017 11:09
complex php
<?php
class PostController
{
public function __construct(PostRepository $postRepository)
{
$this->postRepository = $postRepository;
}
public function index()