Skip to content

Instantly share code, notes, and snippets.

View luizhenriquesoares's full-sized avatar
:octocat:
Focusing

Luiz Henrique Soares luizhenriquesoares

:octocat:
Focusing
  • pathbit
  • São Paulo, Brasil
View GitHub Profile
@luizhenriquesoares
luizhenriquesoares / waya-dl-setup.sh
Last active April 8, 2018 01:48 — forked from mjdietzx/waya-dl-setup.sh
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb"
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@luizhenriquesoares
luizhenriquesoares / graphQL mutation query
Last active October 22, 2017 00:45
graphQL mutation query
mutation{
addOP(
airline: "gol"
from: "REC"
to: "CWB"
flightNumber: "G3-2087"
cabin: "EC"
duration: 320
departureDate: "27/11/2017"
arrivalDate: "01/12/2017"
@luizhenriquesoares
luizhenriquesoares / md
Created October 23, 2017 13:52
Laravel GitScrum Set Config
.env Laravel gitScrum
```
APP_ENV=local
APP_KEY=base64:W2ToyfW8zHqtWfcZb1hp2kZgccbuy3XtERDyZywtVkE=
APP_DEBUG=true
APP_LANG=pt
APP_LOG_LEVEL=debug
APP_URL=http://localhost:3000
APP_TITLE=teste
@luizhenriquesoares
luizhenriquesoares / .graphql
Last active November 1, 2017 00:31
getSmiles Query
{
getSmiles(ida: "2017-11-15", volta: "2017-11-30", criancas: "1", origem: "REC", adultos: "1", destino: "MAO") {
menorTarifa
taxaEmbarque
passagens {
pontos
opcoesIda {
nrVoo
origem
destino
@luizhenriquesoares
luizhenriquesoares / .js
Created November 5, 2017 01:16
gulp all folders and files .js
gulp.task("scripts", function() {
return gulp
.src("./**/*.js")
.pipe(concat("all.js"))
.pipe(gulp.dest("./dist/"));
});
@luizhenriquesoares
luizhenriquesoares / jsx
Created November 9, 2017 01:24
table dymanic react
import React, { Component } from 'react';
import { Segment, Tab, Icon, Table, Image } from "semantic-ui-react";
import { graphql, compose } from "react-apollo";
import { connect } from 'react-redux';
import { withApollo } from 'react-apollo';
import gql from 'graphql-tag';
import getUserCache from '../../../graphql/query/currentUser.graphql';
import smiles from "../../../graphql/mutation/getSmiles.graphql";
import airports from "../../../graphql/mutation/getAirports.graphql";
{
"requestedFlightSegmentList": [
{
"type": "SEGMENT_1",
"flightList": [
{
"uid": "9gi2vlhuevvg31y75l4y",
"stops": 1,
"cabin": "ECONOMIC",
"sourceGDS": "AMADEUS",
getLinks(function() {
var t = document.getElementById("debitosPessoa");
var trs = t.getElementsByTagName("tr");
var data = [];
for (var i = 0; i < trs.length; i++) {
tds = trs[i].getElementsByTagName("td");
for (var n = 0; n < trs.length; n++) {
@luizhenriquesoares
luizhenriquesoares / .cs
Created January 8, 2018 14:35
regex AL
public static DataTable getResultRegex(string text)
{
DataTable gridList = new DataTable();
DataTable result = new DataTable();
gridList.Columns.Add("Match");
result.Columns.Add("Result");
string pattern = @"([0-9]{9})";
foreach (Match m in Regex.Matches(text, pattern))
public static DataTable getResultRegex(string text)
{
DataTable gridList = new DataTable();
gridList.Columns.Add("Match");
string pattern = @"[A-Z]{2}\d{8}";
foreach (Match m in Regex.Matches(text, pattern))
{
gridList.Rows.Add(m.Value);
}