Skip to content

Instantly share code, notes, and snippets.

View idiogo's full-sized avatar

Diogo Carneiro idiogo

View GitHub Profile
@idiogo
idiogo / new-feature
Created March 6, 2018 14:18
Move to /usr/local/bin/ and chmod -x /usr/local/bin/new-feature
#!/bin/bash
echo "Base branch name to fetch:"
read BRANCH_FETCH
BRANCH_FETCH_CHECKOUT=`echo $BRANCH_FETCH | sed -e "s/ /\//g"`
echo "New feature branch:"
read BRANCH_FEATURE
git stash
@idiogo
idiogo / .gitconfig
Created March 6, 2018 13:11
git alias and colors
[alias]
s = status
cm = commit -am
lll = !git log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
ll = !git log --stat --abbrev-commit
l = !git log --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
[color]
diff = auto
status = auto
{"swagger":"2.0","info":{"description":"Search API","version":"1.0.0","title":"Search API"},"host":"localhost:9005","basePath":"/","tags":[{"name":"Search","description":"Search endpoints"}],"paths":{"/search":{"get":{"tags":["Search"],"summary":"Search by term","operationId":"searchUsingGET","consumes":["application/json"],"produces":["application/json;charset=UTF-8"],"parameters":[{"name":"group","in":"query","description":"search group","required":false,"type":"string","enum":["MAIN","INVITE","PLACES","STORE","GAMES","SERVICES","MEMBERSHIPS"]},{"name":"term","in":"query","description":"search term","required":false,"type":"string"},{"name":"longitude","in":"query","description":"high precision longitude","required":false,"type":"string"},{"name":"latitude","in":"query","description":"high precision latitude","required":false,"type":"string"},{"name":"skip","in":"query","description":"number of rows to skip (for pagination)","required":false,"type":"integer","format":"int32"},{"name":"device_os","in":"heade
@idiogo
idiogo / force-desktop-version.html
Last active November 1, 2017 05:57
Generic static file to force some url to open on desktop version (zoom out). Just put the destination url after # (ex: force-desktop-version.html#https://....)
<!DOCTYPE html>
<html>
<head>
<title>Force Desktop Version</title>
</head>
<body style="margin:0px;padding:0px;overflow:hidden">
<iframe id="iframe" src="" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:150%;width:150%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="150%"
width="150%"></iframe>
<script>
@idiogo
idiogo / serverless.yml
Created June 30, 2017 12:39
template schedule lambda function on serverless
service: queue-processor-example
provider:
name: aws
runtime: nodejs6.10
timeout: 300
functions:
queueFunction:
handler: handler.queueFunction
events:
- schedule: rate(1 minute)
@idiogo
idiogo / config2.txt
Created June 9, 2017 17:18
raspberry 4k
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=-150
@idiogo
idiogo / config1.txt
Created June 9, 2017 17:17
raspberry 4k
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
hdmi_timings=3840 1 48 32 80 2160 1 3 5 54 0 0 0 30 0 266610000 3
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0
# uncomment the following to adjust overscan. Use positive numbers if console
@idiogo
idiogo / config.txt
Created April 18, 2017 04:27
Raspbian /boot/config.txt for 4k display
### To get 4K resolution at 25Hz use the following set of parameters
gpu_mem_1024=256
framebuffer_width=3840
framebuffer_height=2160
max_framebuffer_width=3840
max_framebuffer_height=2160
hdmi_ignore_edid=0xa5000080
hdmi_drive=2
hdmi_pixel_freq_limit=400000000
hdmi_group=2
@idiogo
idiogo / custom_faq.css
Created February 16, 2017 13:15
Custom Helpshift FAQ CSS
/*
Helpshift Support Portal CSS
============================
This CSS overrides the default Helpshift support portal CSS. You can
edit the attributes below to match the CSS to your site's look & feel.
Helpshift Support Portal is responsive -
* Sections on support page are presented in 3, 2, 1 column on
desktop, tablets, mobile devices respectively
@idiogo
idiogo / geckoboard4Ktweak.html
Created February 2, 2017 17:47
Geckoboard 16 columns tweak for 4k screen
<html>
<head>
<style type="text/css">
* {
margin:0;
padding: 0;
}
iframe{
float:left;
width: 50%;