Skip to content

Instantly share code, notes, and snippets.

Gonçalo Silva goncalossilva

Block or report user

Report or block goncalossilva

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:0964bd49ff117d36b75b7c242c233d0f
// On a Huawei Watch
// 2225ms
for (i in 0..10000) {
launch(UI) {
withContext(DefaultDispatcher) { }
}
}
// 10ms
View 40-catleap.conf
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Catleap"
HorizSync 143.073
VertRefresh 95.002
Modeline "2560x1440_95" 389.16 2560 2608 2640 2720 1440 1443 1448 1506 +hsync -vsync
Option "DPMS"
EndSection
View 71.44
//<![CDATA[
// a few things don't have var in front of them - they update already existing variables the game needs
lanesSide = 3;
patchesAhead = 52;
patchesBehind = 12;
trainIterations = 500000;
// the number of other autonomous vehicles controlled by your network
@goncalossilva
goncalossilva / .gitconfig
Last active Mar 7, 2018
Autoremove deleted and merged branches, locally and remotely.
View .gitconfig
[alias]
autoremove = "!f() { \
whitelist=\"master|dev|legacy\"; \
git fetch --prune; \
if [ -z \"$1\" ]; then \
list=$(git branch --merged | egrep -v \"(^\\*|$whitelist)\") && \
cmd='echo \"$list\" | xargs -n 1 git branch -d'; \
else \
list=$(git branch -r --merged | grep \"$1\" | egrep -v \"(>|$whitelist)\") && \
cmd='echo \"$list\" | cut -d'/' -f2- | xargs -n 1 git push \"$1\" --delete'; \
View psc.md

Porto Summer of Code, 9 a 11 de Setembro

O Porto Summer of Code é uma competição de programação de 3 dias que já vai na terceira edição. Além da competição, vai haver workshops, vários gadgets (VR, wearables, etc), gaming stations e uma zona de chill-out para relaxar e confraternizar.

Este ano, pela primeira vez, o evento está aberto a todos. E é aí que vocês entram: convido-vos a formar uma equipa e a surgir no evento. Além de 3 dias de diversão, há prémios ;)

Além de se juntarem a nós, agradecia se pudessem divulgar o evento nos vossos meios. Temos pessoas inscritas de todo o país, mas é sempre muito complicado chegar a toda a gente.

Eis alguns conteúdos que podem ser utilizados para espalhar a palavra:

View Message.java
public class Message {
private long id;
private long userId;
private long postedTs;
private String content;
public Message(long id, long userId, long postedTs, String content) {
this.id = id;
this.userId = userId;
this.postedTs = postedTs;
@goncalossilva
goncalossilva / gifenc.sh
Last active Mar 4, 2019
Handy scripts to encode mp4, webm and gif using ffmpeg (2.6 or above). Audio is discarded on all of these!
View gifenc.sh
#!/bin/sh
# sh gifenc.sh input.mp4 output.gif
# Optionally accepts width / height (one or both).
palette="/tmp/palette.png"
filters="fps=15"
if [ ! -z $3 ]; then
if [ ! -z $4 ]; then
filters="$filters,scale=$3:$4"
View gist:b5199d745d6051f3a381
### Keybase proof
I hereby claim:
* I am goncalossilva on github.
* I am goncalossilva (https://keybase.io/goncalossilva) on keybase.
* I have a public key whose fingerprint is C272 B075 3313 6571 5980 70A5 4AC5 F859 0A77 0315
To claim this, I am signing this object:
View gist:0e571470b232e2ba4fb7
dx --dex --num-threads=4 --output app/build/intermediates/dex/google/debug app/build/intermediates/classes/google/debug app/build/intermediates/dependency-cache/google/debug /build/intermediates/pre-dexed/google/debug/bugsense-3.6.1-dab08a48400319f720951c05a15093fa84d1639a.jar app/build/intermediates/pre-dexed/google/debug/classes-05334bb2a2664029bf7f4b2da6361c325c5476bf.jar app/build/intermediates/pre-dexed/google/debug/classes-200692cdc7d950e2e88177c4883b3f93381dd231.jar app/build/intermediates/pre-dexed/google/debug/classes-36539e46b9820907d51e2e52f0833f7c33debd3a.jar app/build/intermediates/pre-dexed/google/debug/classes-40a260ec86147cc79755d457bde057edb0f07abe.jar app/build/intermediates/pre-dexed/google/debug/classes-46ca0b7dc2b826d4414c2d3d0cacdc4c5257c6d8.jar app/build/intermediates/pre-dexed/google/debug/classes-5128cf04b649594e4626c110d0543bc798c591d0.jar app/build/intermediates/pre-dexed/google/debug/classes-57782c1351a42037a9d41431771c41ad7b72ae07.jar app/build/intermediates/pre-dexed/google/debug
@goncalossilva
goncalossilva / actionbarsherlock.build.gradle
Last active Dec 22, 2015
Dependencies project and libraries. Imaginary snippets based on the actual code, but greatly simplified
View actionbarsherlock.build.gradle
// ActionBarSherlock:actionbarsherlock's build.gradle snippet
dependencies {
compile 'com.android.support:support-v4:18.0.+'
}
You can’t perform that action at this time.