Skip to content

Instantly share code, notes, and snippets.

View jeanfbrito's full-sized avatar
🌱
Seeding the future!

Jean Brito jeanfbrito

🌱
Seeding the future!
View GitHub Profile
@iksose
iksose / restAPI.markdown
Last active September 21, 2023 06:39
Creating a REST API using Node.js, Express, and MongoDB

###Creating a REST API using Node.js, Express, and MongoDB

####Installing Node.js

Go to http://nodejs.org, and click the Install button. Run the installer that you just downloaded. When the installer completes, a message indicates that Node was installed at /usr/local/bin/node and npm was installed at /usr/local/bin/npm. At this point node.js is ready to use. Let’s implement the webserver application from the nodejs.org home page. We will use it as a starting point for our project: a RESTful API to access data (retrieve, create, update, delete) in a wine cellar database.

Create a folder named nodecellar anywhere on your file system. In the wincellar folder, create a file named server.js.

@rxaviers
rxaviers / gist:7360908
Last active April 25, 2024 11:15
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Hamcha
Hamcha / SmoothFollow.cs
Created July 28, 2013 00:45
Stupid Unity scripts : "Smooth Follow" from Standard Assets
// Smooth Follow from Standard Assets
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead.
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;
@jeanfbrito
jeanfbrito / server.md
Last active December 19, 2015 00:18
Ubuntu with Nginx + Ruby 2.0.0 + PostgreSQL 9.2 + Passenger + Papistrano

Ubuntu with Nginx + Ruby 2.0.0 + PostgreSQL 9.1 + Passenger + Papistrano

Update the system

sudo apt-get update

Install some dependencies

@fernandosavio
fernandosavio / cidades-brasil.json
Last active April 8, 2018 06:04
JSON com as cidades brasileira segundo o IBGE.
{
"Acre": ["Acrel\u00e2ndia","Assis Brasil","Brasil\u00e9ia","Bujari","Capixaba","Cruzeiro do Sul","Epitaciol\u00e2ndia","Feij\u00f3","Jord\u00e3o","M\u00e2ncio Lima","Manoel Urbano","Marechal Thaumaturgo","Pl\u00e1cido de Castro","Porto Acre","Porto Walter","Rio Branco","Rodrigues Alves","Santa Rosa do Purus","Sena Madureira","Senador Guiomard","Tarauac\u00e1","Xapuri"],
"Alagoas": ["\u00c1gua Branca","Anadia","Arapiraca","Atalaia","Barra de Santo Ant\u00f4nio","Barra de S\u00e3o Miguel","Batalha","Bel\u00e9m","Belo Monte","Boca da Mata","Branquinha","Cacimbinhas","Cajueiro","Campestre","Campo Alegre","Campo Grande","Canapi","Capela","Carneiros","Ch\u00e3 Preta","Coit\u00e9 do N\u00f3ia","Col\u00f4nia Leopoldina","Coqueiro Seco","Coruripe","Cra\u00edbas","Delmiro Gouveia","Dois Riachos","Estrela de Alagoas","Feira Grande","Feliz Deserto","Flexeiras","Girau do Ponciano","Ibateguara","Igaci","Igreja Nova","Inhapi","Jacar\u00e9 dos Homens","Jacu\u00edpe","Japaratinga","Jaramataia","Jequi\u00e1 da Praia","Jo
@cdmwebs
cdmwebs / friendly_urls.markdown
Created September 11, 2011 15:50 — forked from jcasimir/friendly_urls.markdown
Friendly URLs in Rails

Friendly URLs

By default, Rails applications build URLs based on the primary key -- the id column from the database. Imagine we have a Person model and associated controller. We have a person record for Bob Martin that has id number 6. The URL for his show page would be:

/people/6

But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6 here, is called the "slug". Let's look at a few ways to implement better slugs.