Skip to content

Instantly share code, notes, and snippets.

View dcalixto's full-sized avatar
🎯
Focusing

Daniel dcalixto

🎯
Focusing
View GitHub Profile
@dcalixto
dcalixto / authentication_with_bcrypt_in_rails_4.md
Created February 7, 2018 21:47 — forked from thebucknerlife/authentication_with_bcrypt_in_rails_4.md
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@dcalixto
dcalixto / LICENCE SUBLIME TEXT
Created January 22, 2018 19:00
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
@dcalixto
dcalixto / rails-postgres-backbone-bootstrap-bootswatch
Created January 5, 2018 18:47 — forked from sionc/rails-postgres-backbone-bootstrap-bootswatch
Instructions on creating a new app using Ruby on Rails, Postgresql, Backbone.js, Twitter Boostrap, Bootstwatch
- Check rails version
$ rails -v
- To update rails
$ gem update rails
- Creating a new rails app using postgresql
$ mkdir rails_projects
$ cd rails_projects
$ rails new myapp --database=postgresql
Android Emulator usage: emulator [options] [-qemu args]
options:
-sysdir <dir> search for system disk images in <dir>
-system <file> read initial system image from <file>
-datadir <dir> write user data into <dir>
-kernel <file> use specific emulated kernel
-ramdisk <file> ramdisk image (default <system>/ramdisk.img
-image <file> obsolete, use -system <file> instead
-initdata <file> same as '-init-data <file>'
-data <file> data image (default <datadir>/userdata-qemu.img
@dcalixto
dcalixto / ubuntu14.04-command-line-install-android-sdk
Created November 20, 2017 23:04 — forked from JoshvaR88/ubuntu14.04-command-line-install-android-sdk
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@dcalixto
dcalixto / ubuntu14.04-command-line-install-android-sdk
Created November 16, 2017 20:15 — forked from shark0der/ubuntu14.04-command-line-install-android-sdk
Ubuntu 14.04 command line install android sdk (platform & platform-tools only, no emulator)
# install java
apt-get install -y software-properties-common
apt-add-repository -y ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
# download latest android sdk
# http://developer.android.com/sdk/index.html#Other
cd /opt
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
@dcalixto
dcalixto / react-native-setup-linux.md
Created November 13, 2017 19:23 — forked from andrei-cacio/react-native-setup-linux.md
React native setup on Ubuntu/Linux

Guide for installing React Native on Linux (ubuntu 14.04)

Step 1: Install JDK 7

sudo apt-get install openjdk-7-jdk

Step 2: Download the Android SDK

@dcalixto
dcalixto / sugar-vs-fat.md
Created October 29, 2017 22:02 — forked from diegoeis/sugar-vs-fat.md
Anotações sobre o documentário Sugar vs Fat

Sugar VS Fat (Netflix)

  • açúcar não é apenas aquele pó branco, mas pão, frutas, farinha branca se transformam em açúcar no sangue
  • quem faz a dieta baseada em proteína/gordura não faz muito coco
  • Gordura saturada eleva o colesterol, bloqueia as artérias
  • muito açúcar no sangue libera insulina, que é um hormônio que regula o açúcar no sangue. comer muito açúcar pode nos fazer engordar.
  • muito açúcar pode nos levar a diabetes
  • Exames de colesterol e insulina são bons pra entender seu estado físico
  • Testes de massa muscular e gordura é importante pra saber a porcentagem de gordura e músculo no corpo, composição corporal
  • glicose é o melhor é o principal combustível do cérebro
@dcalixto
dcalixto / android_instructions.md
Created July 10, 2017 16:57 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@dcalixto
dcalixto / application_controller.rb
Last active March 6, 2017 01:44 — forked from fred/application_controller.rb
Adding Opensearch to my Rails 3.2 app
#app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
def opensearch
response.headers['Content-Type'] = 'application/opensearchdescription+xml; charset=utf-8'
end