Skip to content

Instantly share code, notes, and snippets.

@calimaborges
calimaborges / Default (OSX).sublime-keymap
Created August 31, 2012 04:02
Sublime OS X Shortcuts
/*
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
and don't need to be repeated here. Anything listed here will take precedence, however.
*/
[
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} },
@calimaborges
calimaborges / gitsvn.md
Last active May 20, 2018 21:09
Atalhos para o Git e Git-Svn

#Configuração Inicial

Primeiro inicie o repositório apontando para o svn

$ git svn init http://svn.endereco.repo.com/ nome_da_pasta_local

depois, baixe o repositório (esse passo demora... muito.)

$ git svn fetch
@calimaborges
calimaborges / environement.md
Created October 22, 2012 18:29
Sugestions to environment variables

Proxy config

http_proxy="http://carlosb@senha:172.19.100.35:8080/"
https_proxy="https://carlosb@senha:172.19.100.35:8080/"
ftp_proxy="ftp://carlosb@senha:172.19.100.35:8080/"

PS1

RESET="\[\017\]"
@prime31
prime31 / gist:5675017
Last active May 28, 2024 11:37
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@calimaborges
calimaborges / readme.md
Last active March 4, 2018 22:03
Curl Examples

curl examples

Usefull for REST

GET

curl -i -H "Accept: application/json" http://192.168.0.165/persons/person/1  
import React from "react";
import { Link } from "react-router-dom";
export function createResource(getPromise) {
let cache = {};
let inflight = {};
let errors = {};
function load(key) {
inflight[key] = getPromise(key)