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 / 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();