Skip to content

Instantly share code, notes, and snippets.

@dre3s
dre3s / git.utils.daily.md
Last active November 10, 2016 19:22
git.utils.daily

#Reset

Voltar como estava no remote

$ git reset --hard origin/master

#Merge

Fazer merge de um arquivo específico

@dre3s
dre3s / nginx.md
Created April 15, 2016 21:27
nginx.md

Nginx

log error

tail -f /var/log/nginx/error.log

@dre3s
dre3s / mobile.md
Last active January 20, 2016 17:20
mobile

Mobile developer

#links

Metas tag

Viewport para mobile, limita zoom e ajusta escala de layout

@dre3s
dre3s / test.urls.md
Last active December 14, 2016 20:23
test.urls

tests

L

@dre3s
dre3s / my.js.querystring.md
Last active January 18, 2016 16:46
my.js.querystring

Query Strings Url

Como pegar parâmetros da url
var queryString = {
  getParams: function() {
    return this._getQueryString(window.location);
  },
@dre3s
dre3s / my.js.underscore.tpl.settings.md
Last active January 12, 2016 18:07
my.js.underscore.tpl.settings

UnderscoreJs - Template Settings

  var templateHtml = this.$el.html(),                                                                              |      <span class="item-duration">{{= item.duration }}</p>                                  
  content = {                                                                                                      |      </a>                                                                                  
    item: this.item.attributes                                                                                     |      <div class="item-info">                                                               
  },                                                                                                               |        <p class="item-sectionName">                                                        
  tplSetting = {                                                                                                   |          <a href="{{= item.se
@dre3s
dre3s / my.mac.zip.file.md
Last active January 12, 2016 18:06
my.mac.zip.file

Zip files on terminal of the mac

$ zip -r filesZipped file1 file2 folder1 folder2

Unzip filesZipped

$ unzip filesZipped.zip
@dre3s
dre3s / my.study.shell.file.md
Last active January 12, 2016 18:06
my.study.shell.file

Creating shell script and run

create file clean.sh

#!/bin/bash
rm README.md

run shell script with

$ . clean.sh
@dre3s
dre3s / my.study.vagrant.starting.md
Last active January 12, 2016 18:05
my.study.vagrant.starting.md

Starting with vagrant

Installing Virtualbox:

$ sudo apt-get install virtualbox

Installing Vagrant:

$ sudo apt-get install vagrant

>dkms

@dre3s
dre3s / my.study.heroku.starting.md
Last active January 12, 2016 18:04
my.study.heroku.starting

#Deploy project Ruby on Rails on Heroku

Deploy first App on Heroku

download and install

$ wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh

deploy your project

$ cd site_example
$ git init