Skip to content

Instantly share code, notes, and snippets.

View squillace91's full-sized avatar
🚀
building cool things

João S squillace91

🚀
building cool things
  • BC, Canada
  • 09:29 (UTC -07:00)
View GitHub Profile
avatar {
border-radius: 10%;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.09), 0 6px 20px 0 rgba(0, 0, 0, 0.21);
width: 110px;
}
@squillace91
squillace91 / autocomplete.html
Created December 17, 2017 23:51
Code to get lat and lng using google maps autocomplete API
<head>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>
</head>
<body>
<label for="locationTextField">Location</label>
<input id="locationTextField" type="text" size="50">
<script>
function init() {
@squillace91
squillace91 / deployment.heroku
Last active November 14, 2017 00:53
Steps to deploy jungle to heroku
#installing heroku
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
heroku login
----login
----pwd
heroku create
git config --list | grep heroku
git push heroku heroku-deployment:master
@squillace91
squillace91 / temp user login
Created November 9, 2017 21:19
temp user login
<section class="admin-products-new">
<header class="page-header">
<h1>Login</h1>
</header>
<div class="row">
<div class="col-sm-6 col-sm-offset-1">
<%= form_for :user, url: '/sessions' do |form| %>
@squillace91
squillace91 / newlogin
Created November 9, 2017 21:08
login user jungle
<h1>Login</h1>
<%= form_tag '/sessions/' do %>
Email: <%= text_field_tag :email %>
Password: <%= password_field_tag :password %>
<%= submit_tag "Submit" %>
<% end %>
@squillace91
squillace91 / setup-rails
Last active November 9, 2017 01:20
Setting up a new project using rails --- blog example
#create a new model
bin/rails generate model Article title:string text:text
bin/rails generate model Comment commenter:string body:text article:references
- it creates a migration in db/migrate
#create a controller
bin/rails generate controller Comments
#run migration
bin/rake db:migrate
@squillace91
squillace91 / jungle
Last active November 8, 2017 18:33
setting up jungle
cp config/database.example.yml config/database.yml
bin/rails s -b 0.0.0.0 --- run rails using the current project version
s is shorter for server
nvm ls --- show node version
rvm rubies --- show ruby version
@squillace91
squillace91 / packages using command line
Last active November 7, 2017 19:23
useful packages
# git extras add funtionalities to git, such as git ignore --- git ignore build "node_modules" ---
sudo apt-get install git-extras
#open touchegg config file
xdg-open ~/.config/touchegg/touchegg.conf
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>