Skip to content

Instantly share code, notes, and snippets.

View alexlopes's full-sized avatar
🏠
Working from home

Alex Lopes alexlopes

🏠
Working from home
View GitHub Profile
@alexlopes
alexlopes / config_cordova_ubuntu.sh
Last active August 29, 2015 14:26
Installing PhoneGap Cordova in Ubuntu
sudo apt-get update
sudo apt-get install npm
sudo npm install -g cordova
ln -s /usr/bin/nodejs /usr/bin/node
sudo chmod 777 -R helloworld
@alexlopes
alexlopes / gist:da4f3b9ee220c4d43a9e
Last active September 8, 2015 03:24
Hubot + Heroku + Slack
https://github.com/slackhq/hubot-slack
https://github.com/github/hubot/blob/master/docs/deploying/heroku.md
http://blog.pandorabots.com/putting-your-bot-on-slack/
https://dashboard.heroku.com/apps/evening-wave-1769/resources
https://lopesale.slack.com/messages/@alexlopes/
@alexlopes
alexlopes / gist:a41aab70ecef2b96716c
Last active October 6, 2015 02:39
cordova_phonegap_tricks
https://jorgerafaelkury.wordpress.com/2014/05/28/instalacao-do-phonegap-cordova-ubuntu-1404/
http://www.smashingmagazine.com/2014/02/four-ways-to-build-a-mobile-app-part3-phonegap/
http://www.raymondcamden.com/2013/11/05/Ripple-is-Reborn
http://www.loiane.com/2013/06/integrando-sencha-touch-com-phonegap-hello-world/
https://github.com/ccoenraets/phonegap-workshop-jquk2014/wiki/PhoneGap-Workshop
#How to find Python site packages
import site; site.getsitepackages()
>>> import os
>>> import inspect
>>> inspect.getfile(os)
#Install setup.py
python setup.py install
@alexlopes
alexlopes / git_tricks.md
Last active September 6, 2018 00:39
git_tricks

Deletin branches

Deleting local branches in Git

git branch -d feature/login

Deleting remote branches in Git

git push origin --delete feature/login
@alexlopes
alexlopes / django_tricks.md
Last active December 9, 2015 11:21
Django Tricks

#Make many-to-many field optional in Django?

  • If you want to be able to specify ManyToMany relation without making it required just use blank=True:
class Group(models.Model):
    ...
    events = models.ManyToManyField(Event, blank=True)
@alexlopes
alexlopes / bitbucket_openshift.md
Created February 3, 2016 00:59
Bitbucket + OpenShift Integration

#teste

@alexlopes
alexlopes / ionic_tricks.md
Last active June 16, 2016 04:36
Ionic Getting Started

#Page

##Create a page

ionic g page reacoes-adversas-analysis

#Adding a specific plataform version

@alexlopes
alexlopes / docker_tricks.md
Last active February 11, 2020 03:06
Docker Tricks

Run Docker without Sudo

Add the docker group if it doesn't already exist.

sudo groupadd docker

Add the connected user "${USERNAME}" to the docker group.

sudo gpasswd -a ${USERNAME} docker

Add your user to the docker group.

sudo usermod -aG docker $USER