Skip to content

Instantly share code, notes, and snippets.

int A = 12;
// B is a pointer to the address of A
int *B = &A;
// C is a nickname for A, or a reference to A
// If either A or C change, both will change.
int &C = A;
C=99;
# message.html
<form class="form" action="{% url 'validate' %}" id="" method="POST">
{% comment %} csrf_token must be added for security reasons {% endcomment %}
{% csrf_token %}
<div class="form-group">
<label for="emailLabel">Email address</label>
<input name="email" type="email" class="form-control"
id="email" aria-describedby="emailLabel" placeholder="Email Address">
</div>
cardArray = [0] * 52
names = ["Oliver", "James", "Rui", "Ricky", "Paul"]
def setCardArrayToZero():
print("Array before:")
print(cardArray)
for index in range(5):
cardArray[index] = 0
@oleoneto
oleoneto / Queue.swift
Created March 28, 2018 03:14
Custom implementation of a Queue ADT in Swift.
//
// Queue.swift
// Ekletik Studios
// Custom implementation of a Queue Data Structure.
// Created by Leo Neto on 3/22/18.
// Copyright © 2018 Leo Neto. All rights reserved.
//
import Foundation
@oleoneto
oleoneto / Stack.swift
Created March 28, 2018 03:15
Custom implementation of a Stack ADT in Swift
//
// Stack.swift
// Ekletik Studios
// Custom implementation of a Stack Data Structure.
// Created by Leo Neto on 3/21/18.
// Copyright © 2018 Leo Neto. All rights reserved.
//
import Foundation

Inside app.py:

# Homepage: www.example.com
@route("/")
def homepage():
    somevariable = "John"
    return template("homepage.html", name=somevariable)
    
# About Us: www.example.com/about

Keybase proof

I hereby claim:

  • I am oleoneto on github.
  • I am oleoneto (https://keybase.io/oleoneto) on keybase.
  • I have a public key ASA9BrT9zFLsd5XFX9LbJyHN-X1JeqCGuPiPyopk_PqUego

To claim this, I am signing this object:

@oleoneto
oleoneto / PythonSetup.md
Created July 13, 2018 19:45 — forked from patriciogonzalezvivo/PythonSetup.md
How to install Python correctly on Mac OSX

Install Homebrew

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

Add PATH to ~/.bash_profile and ~/.zshrc

export PATH=/usr/local/bin:$PATH
@oleoneto
oleoneto / RAILS_CHEATSHEET.md
Created August 9, 2018 20:52 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@oleoneto
oleoneto / rails-and-mongo.md
Created August 12, 2018 00:46 — forked from casidiablo/rails-and-mongo.md
Steps to create a Rails application with MongoDb

This document contains the steps to create a mongo-enabled Rails 3.1 application. This is just for personal reference actually.

Create base application

We have to skip the Active Record stuff:

rails new app_name --skip-active-record

Add mongo and bson_ext to the Gemfile