Skip to content

Instantly share code, notes, and snippets.

Avatar

Matheus Marabesi marabesi

View GitHub Profile
@marabesi
marabesi / curl_post_json.md
Created Jul 17, 2020 — forked from ungoldman/curl_post_json.md
post a JSON file with curl
View curl_post_json.md

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@marabesi
marabesi / References
Created Apr 15, 2020 — forked from jpcaparas/References
Limit docker CPU and memory resource usage
View References
Inspired by: https://stackoverflow.com/questions/46408673/docker-17-06-ce-default-container-memory-limit-on-shared-host-resources/46557336#46557336
View gist:e341caf8c263104ec471972ee23a8f70
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
View MPU6050.ino
/**
* http://tutorial45.com/mpu6050-arduino-project/
*/
#include <Wire.h>
#include <MPU6050.h>
MPU6050 mpu;
void setup()
{
@marabesi
marabesi / stopwords.txt
Last active Mar 16, 2018 — forked from alopes/stopwords.txt
Portuguese stop words
View stopwords.txt
de,a,o,que,e,do,da,em,um,para,é,com,não,uma,os,no,se,na,por,mais,as,dos,como,mas,foi,ao,ele,das,tem,à,seu,sua,o,u,ser,quando,muito,há,nos,já,está,eu,também,só,pelo,pela,até,isso,ela,entre,era,depois,sem,mesmo,aos,ter,seus,quem,nas,me,esse,eles,estão,você,tinha,foram,essa,num,nem,suas,meu,às,minha,têm,numa,pelos,elas,havia,seja,qual,será,nós,tenho,lhe,deles,essas,esses,pelas,este,fosse,dele,tu,te,vocês,vos,lhes,meus,minhas,teu,tua,teus,tuas,nosso,nossa,nossos,nossas,dela,delas,esta,estes,estas,aquele,aquela,aqueles,aquelas,isto,aquilo,estou,está,estamos,estão,estive,esteve,estivemos,estiveram,estava,estávamos,estavam,estivera,estivéramos,esteja,estejamos,estejam,estivesse,estivéssemos,estivessem,estiver,estivermos,estiverem,hei,há,havemos,hão,houve,houvemos,houveram,houvera,houvéramos,haja,hajamos,hajam,houvesse,houvéssemos,houvessem,houver,houvermos,houverem,houverei,houverá,houveremos,houverão,houveria,houveríamos,houveriam,sou,somos,são,era,éramos,eram,fui,foi,fomos,foram,fora,fôramos,seja,sejamos,sejam,fos
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@marabesi
marabesi / gps_demo.py
Last active Feb 6, 2018 — forked from wolfg1969/README.md
python-gps sample codes
View gps_demo.py
import os
from gps import *
from time import *
g = gps(mode=WATCH_ENABLE)
while 1:
os.system('clear')
g.poll()
if PACKET_SET:
g.stream()
@marabesi
marabesi / locale.sh
Created Dec 31, 2017
Fix raspberry pi PERL warning locale
View locale.sh
#!/bin/bash
# The issue explained: http://daker.me/2014/10/how-to-fix-perl-warning-setting-locale-failed-in-raspbian.html
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
@marabesi
marabesi / Sizes.md
Created Oct 30, 2017 — forked from jperl/Sizes.md
Meteor App Icon and Launch Screen Size Guide
View Sizes.md

Icons

Name Size
iphone_2x 120x120
iphone_3x 180x180
ipad 76x76
ipad_2x 152x152
android_ldpi 36x36
android_mdpi 48x48
@marabesi
marabesi / cloudSettings
Last active Oct 20, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-10-20T15:42:04.786Z","extensionVersion":"v3.4.3"}
You can’t perform that action at this time.