Skip to content

Instantly share code, notes, and snippets.

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

Wellington Torrejais da Silva wellington1993

🏠
Working from home
View GitHub Profile
@wellington1993
wellington1993 / README.md
Created March 30, 2016 17:24 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@wellington1993
wellington1993 / .gemrc
Created April 5, 2016 11:26 — forked from jch/.gemrc
gemrc example
# http://docs.rubygems.org/read/chapter/11
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
sources:
- http://gems.rubyforge.org/
- http://rubygems.org/
backtrace: true
@wellington1993
wellington1993 / ember-rails-scaffold.md
Created April 18, 2016 13:45 — forked from pixelhandler/ember-rails-scaffold.md
Scaffold for a browser app build with Ember.js, Rails, Ember.Data

Scaffold for a browser app build with Ember.js, Rails, Ember.Data

Journal App

This is a scaffold for setting up: an API with Rails and the ember-rails gem, persistence with Ember.Data, and a browser app using Ember.js

See source code on GitHub: pixelhandler/journal.

@wellington1993
wellington1993 / A-Rails-Angular-install-node.sh
Last active April 4, 2018 08:37
Ubuntu instructions to install Node.js(+ npm) + AngularJS + YEOMAN + generator-angular + rbenv + Ruby + Rails-api - App Example: https://github.com/wellington1993/astronauta-test1-rails-angular
# Before this please install zsh and oh-my-zsh
apt-get install curl
#curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs vim htop git gitg
sudo add-apt-repository ppa:chris-lea/node.js
@wellington1993
wellington1993 / rbenv-howto.md
Created April 27, 2016 13:12 — forked from MicahElliott/rbenv-howto.md
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@wellington1993
wellington1993 / 0-examples.cmd
Created April 27, 2016 18:51
Windows bat Prompt CMD Command Examples
@ECHO OFF
cls
:backup-disk
timeout 1 1>NUL
@wellington1993
wellington1993 / ng-really.js
Created April 28, 2016 20:12 — forked from asafge/ng-really.js
ng-really? An AngularJS directive that creates a confirmation dialog for an action.
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function
*/
angular.module('app').directive('ngReallyClick', [function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;
@wellington1993
wellington1993 / Extra info
Created May 5, 2016 20:29 — forked from ryanjm/Extra info
Issues with bad interpreter
Something else I found helpful along the way (as I had old stuff installed):
gem uninstall --install-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 rails
@wellington1993
wellington1993 / 1-Deploy-Old-Rails-App.sh
Last active July 18, 2017 16:50
Deploy old Rails 2.3 App
sudo apt update
sudo apt install zlib1g-dev
sudo apt install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
bundle install --system
# Realy very necessary install before ruby!
sudo apt-get install -y aptitude
sudo aptitude install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
@wellington1993
wellington1993 / script-brute-update-ubuntu-debian-apt-linux.sh
Last active April 23, 2018 18:52
Brute Update Ubuntu Mint Linux APT (Run as root, copy and paste into terminal)
#!/bin/bash
#
# Updated 2018-02-20
# If "apt" not exist try "apt-get", because older versions not support "apt"
#
# Preparation, solve problems
sudo w ; \
sudo killall -9 dpkg ; \
#
sudo echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4 ; \