Skip to content

Instantly share code, notes, and snippets.

View cristiana214's full-sized avatar
:octocat:
Building something

Cristiana Chavez cristiana214

:octocat:
Building something
View GitHub Profile
@cristiana214
cristiana214 / coding-best-practices.md
Last active May 22, 2024 07:50
Coding Best Practices

The principles of good programming are connected to good design and engineering principles.

These programming principles have improved my skills as a programmer, and I believe they can do the same for any developer. They help increase efficiency, make code easier to maintain, and reduce the number of bugs.

Write code for maintainers please

Write code for the maintainer When you're writing code, always keep in mind that it will need to be maintained in the future, either the future you or someone else. You might not remember everything about the code in the future, just like someone else who didn't write it. So, always write your code in a way that makes it easy for others to understand and maintain.

@cristiana214
cristiana214 / GitCommitEmoji.md
Created December 10, 2020 17:02 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@cristiana214
cristiana214 / rest-server.py
Created February 27, 2017 07:39 — forked from miguelgrinberg/rest-server.py
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask.ext.httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@cristiana214
cristiana214 / rest-server.py
Created February 27, 2017 07:39 — forked from miguelgrinberg/rest-server.py
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask.ext.httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@cristiana214
cristiana214 / ci-encryption-key-generator.php
Last active August 28, 2015 05:08 — forked from jeffreybarke/ci-encryption-key-generator.php
This is the code I use (minus Google Analytics) for the CodeIgniter encryption key generator located at http://jeffreybarke.net/tools/codeigniter-encryption-key-generator/
<?php
/**
* Generate an encryption key for CodeIgniter.
* http://codeigniter.com/user_guide/libraries/encryption.html
*/
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP
function generate_token ($len = 32)
{
/*
Usage:
viewPager.setPageTransformer(true, new CardTransformer(0.7f));
*/
public class CardTransformer implements PageTransformer {
private final float scalingStart;
public CardTransformer(float scalingStart) {
super();