Skip to content

Instantly share code, notes, and snippets.

View nandomoreirame's full-sized avatar
🎧
Working from home

Fernando Moreira nandomoreirame

🎧
Working from home
View GitHub Profile
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
find . -name "node_modules" -exec rm -rf '{}' +
find . -name ".git" -exec rm -rf '{}' +
sudo zip -r backup-desktop-dd-mm-YYYY.zip ./
@nandomoreirame
nandomoreirame / android-commands.md
Last active April 7, 2023 23:54
Comandos basicos android, cordova e ionic :)

android

Instalar o apk no device android para testes

adb install -r platforms/android/build/outputs/apk/android-debug.apk

Abre o log do dispositivo android

adb logcat

Lista os adb divices rodando

@nandomoreirame
nandomoreirame / sitemap.xml
Created September 13, 2015 06:41
Jekyll sitemap.xml
---
layout: null
sitemap:
exclude: 'yes'
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in site.posts %}
{% unless post.published == false %}
<url>
@nandomoreirame
nandomoreirame / gist:45002f9ed0b243266e97
Created October 14, 2015 16:04
set fish shell PATH
set -gx PATH YOUR/PATH/HERE $PATH
@nandomoreirame
nandomoreirame / virtualhost.sh
Created October 31, 2015 04:11
Bash Script to easy create or delete apache virtual hosts on ubuntu
# Bash Script to easy create or delete apache virtual hosts on ubuntu
# https://github.com/RoverWire/virtualhost
# Instalation
sudo su
cd /usr/local/bin
wget -O virtualhost https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost.sh
chmod +x virtualhost
# Usage
@nandomoreirame
nandomoreirame / find-replace-sql-wp.sql
Created December 16, 2015 15:41 — forked from celsofabri/find-replace-sql-wp.sql
SQL Query para fazer um simples localizar e substituir / SQL Query to do a simple find and replace
UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_links SET link_url = replace(link_url, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_links SET link_image = replace(link_image, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');
/*UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl' OR option_name = 'widget_text' OR option_name = 'dashboard_widget_options';*/
UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com');
/*
Usage
.container {
width: 1200px;
@include media(min-width 480px) {
font-size: 1.2rem;
}
@nandomoreirame
nandomoreirame / travis.sh
Last active December 24, 2015 17:14
travis encrypt GH_TOKEN
travis encrypt GH_TOKEN=<secret token here> --add
$ sudo apt-get install ruby ruby-dev -y
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io | bash -s stable
$ rvm requirements
$ rvm install ruby
$ rvm use ruby --default
$ rvm rubygems current