Skip to content

Instantly share code, notes, and snippets.

View giorgiofellipe's full-sized avatar
🏛️
Helping people build great business

Giorgio Fellipe giorgiofellipe

🏛️
Helping people build great business
View GitHub Profile
# Download, configure, make and install International Components for Unicode
wget http://download.icu-project.org/files/icu4c/49.1/icu4c-49_1-src.tgz
tar xzvf icu4c-49_1-src.tgz
cd icu/source/
./runConfigureICU MacOSX
make
sudo make install
# Install libjpeg support for GD
brew install jpeg

In OS X 10.10 (Yosemite), Apache has been upgraded from 2.2 to 2.4, which includes some significant changes, and the default config file has changed quite a bit. When you install Yosemite, it renames your old config to httpd.conf~previous, and unfortunately your old one won't work anymore.

To get Apache working again, edit the following files:

/etc/apache2/httpd.conf

Uncomment:

@giorgiofellipe
giorgiofellipe / macbook_projector_fix
Last active August 29, 2015 14:21
Macbook does not recognize the projector
Normal way:
- Click on the Apple Menu in the top left corner of your screen
- Select System Preferences from the drop-down menu
- Select the Displays icon
- When the Displays window appears, select the Arrangement tab within the menu bar
- Check the Mirror Displays box in the lower left-hand corner of the window (Note: After checking this box, please wait several seconds. Once the displays are mirrored, you should see the same image on both your projector and computer.)
First, reset what is called the Power Management Unit (PMU) using these steps:
- Shut down the computer.
- Connect it to AC power.
@giorgiofellipe
giorgiofellipe / gist:baf9c4ed0fbd8c1cb48b
Created August 11, 2014 15:19
Sync MASTER branch with your GH-PAGES branch
$ git add .
$ git status // to see what changes are going to be committed
$ git commit -m 'Some descriptive commit message'
$ git push // push the master branch changes to GitHub
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push // push the gh-pages branch changes to GitHub Pages
$ git checkout master // return to the master branch
By rebasing, all commits on the master branch (and their commit messages) are applied to the gh-pages branch.
@giorgiofellipe
giorgiofellipe / music.json
Created September 18, 2015 03:51
JSON - Music List
[
{
"title":"The King of Limbs",
"songs":[
{
"title":"Bloom",
"length":"5:15"
},
{
"title":"Morning Mr Magpie",
@giorgiofellipe
giorgiofellipe / gist:4c275218bbe0d0ea546d
Created September 18, 2015 04:04
Guia - DEMO Ionic App
1. Copiar .json pra pasta www
2. Instalar angular-resource
2.1 bower install angular-resource
2.2 <script src="lib/angular-resource/angular-resource.min.js"></script> no index.html
2.3 criar module services
angular.module('starter.services', ['ngResource'])
.factory('musicList', function($resource) {
return $resource('music.json', {}, {
angular.module('starter.controllers', [])
.controller('MapCtrl', function($scope, $ionicLoading) {
$scope.mapCreated = function(map) {
$scope.map = map;
};
var markersArray = [];
$scope.centerOnMe = function() {
@giorgiofellipe
giorgiofellipe / Class.js
Created November 25, 2015 12:25
Simple JavaScript inheritance by John Resig - http://ejohn.org/blog/simple-javascript-inheritance/
/* Simple JavaScript Inheritance
* By John Resig http://ejohn.org/
* MIT Licensed.
*/
// Inspired by base2 and Prototype
(function(){
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
// The base Class implementation (does nothing)
this.Class = function(){};
@giorgiofellipe
giorgiofellipe / workshop.md
Last active December 23, 2015 17:38
Ionic Workshop Guide

Projetos utilizados para demonstração ou construídos durante o workshop

Design Patterns

  • IIFE (Immediately-invoked Function Expression) - isolar escopo com o propósito de não misturar variáveis criadas globalmente
  • 'use strict' forçar o uso do JavaScript no modo restrito à versão EC5 ou superior (é ignorado pelas anteriores), não permitindo por exemplo: usar variáveis não declaradas

Preparando Ambiente

@giorgiofellipe
giorgiofellipe / optimize
Created March 10, 2015 00:53
OPTIMIZE IMAGES
#optimize all jpeg files
find . -name "*.jpg" -print0 | xargs -0 -I filename jpegtran -copy none -optimise -outfile filename filename
#optimize all png files
optipng -o7 *.png