Skip to content

Instantly share code, notes, and snippets.

View jdgo-mars's full-sized avatar

João Martins jdgo-mars

View GitHub Profile
@jdgo-mars
jdgo-mars / useUserReducer.ts
Created April 15, 2019 18:18 — forked from schettino/useUserReducer.ts
Better Reducers with React and Typescript 3.4
import { useReducer } from 'react'
export function updateName(name: string) {
return <const>{
type: 'UPDATE_NAME',
name
}
}
export function addPoints(points: number) {
@jdgo-mars
jdgo-mars / Meses e Dias - Array.php
Created March 27, 2017 10:13 — forked from thallisphp/Meses e Dias - Array.php
Array com nomes dos meses e dias da semana em português do Brasil
<?php
$meses = array(
1 => 'Janeiro',
'Fevereiro',
'Março',
'Abril',
'Maio',
'Junho',
'Julho',
@jdgo-mars
jdgo-mars / serverCodes.md
Created March 10, 2017 10:12 — forked from sgnl/serverCodes.md
status codes

1xx: Information

Code Message Description
100 Continue The server has received the request headers, and the client should proceed to send the request body
101 Switching Protocols The requester has asked the server to switch protocols
103 Checkpoint Used in the resumable requests proposal to resume aborted PUT or POST requests

2xx: Successful

Code Message Description
@jdgo-mars
jdgo-mars / app.js
Created January 27, 2016 21:59 — forked from staltz/app.js
Draft of Cycle.js HTTP Driver
const Cycle = require('@cycle/core');
const CycleWeb = require('@cycle/web');
const makeHTTPDriver = require('@cycle/http');
const h = CycleWeb.h;
function main(responses) {
const GITHUB_SEARCH_API = 'https://api.github.com/search/repositories?q=';
// This essentially models when search requests are supposed
// to happen
@jdgo-mars
jdgo-mars / _mixins.scss
Created December 6, 2015 18:37 — forked from garyharan/_mixins.scss
Useful scss mixins (rounded corners, gradients, text-field, button)
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}