Skip to content

Instantly share code, notes, and snippets.

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

Daniel Lemes lemesdaniel

🏠
Working from home
View GitHub Profile
@lemesdaniel
lemesdaniel / notes_on_testing.md
Created June 13, 2021 20:33 — forked from ikusalic/notes_on_testing.md
Exploration: how to do unit testing

Testing notes

Uncle Bob: Test First

Source: http://blog.8thlight.com/uncle-bob/2013/09/23/Test-first.html

  • tests are specs for the system and are more important than the system itself
  • (Tests should be) short, well factored, and well named. They ought to read like specifications; because they are specifications
  • (Goal:) trust your test suite to the extent that, if it passes, you know you
@lemesdaniel
lemesdaniel / aprendago.md
Last active April 21, 2021 01:30
Aprenda GO

CONDUCT https://golang.org/conduct

[In reply to Risso] Aprendendo Go: Manuais, vídeo aulas, livros etc.

Go Desempenho e simultaneidade são atributos importantes, mas não tão importantes quanto simplicidade , legibilidade e produtividade.

Site Oficial

\Unirest\Request::defaultHeader("Authorization", "Bearer ".$token);
\Unirest\Request::defaultHeader("Content-Type", "application/json");
$response = \Unirest\Request::get("https://connect.squareup.com/v1/me");
@lemesdaniel
lemesdaniel / despesa.blade.php
Last active February 29, 2016 00:40
Teste Vue - Cadastro de despesa
@extends('layout/admin')
@section('conteudo')
<h2 class="text-right">Despesa simples</h2><br>
<div id="contentProduto" class="row">
<div class="col-md-7">
$wows = $this->wows
->with('Competitor')
->where('step_id', 1);
$wows->orderBy('time')
->orderBy('time_break')
->get();
$wows = $this->wows
->with('Competitor')
->where('step_id', 1)
->orderBy('time')
->orderBy('time_break')
->get();
$wows = $this->wows
->with('Competitor')
->where('step_id', 1);
if(isset($inputs['sex']) and !empty($inputs['sex']))
$wows->where('sex', $inputs['sex']);
if(isset($inputs['type']) and !empty($inputs['type']))
$wows->where('type', $inputs['type']);
@lemesdaniel
lemesdaniel / gist:97ac0c3ebe2bd1c72adf
Last active September 5, 2015 23:11 — forked from liamcurry/gist:2597326
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@lemesdaniel
lemesdaniel / routes.php
Last active August 29, 2015 14:28 — forked from raank/routes.php
my routes.php
Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function()
{
Route::get('/',['as'=>'admin.index', 'uses' => 'Admin\DashboardController@index']);
Route::get('dashboard', ['as'=>'admin.dashboard', 'uses' => 'Admin\DashboardController@index']);
});
var client = new Faye.Client('http://9b1cf4d8.fanoutcdn.com/bayeux');
client.subscribe('/test', function (item) {
app.posts.push({ title: item.data.message })
});