Skip to content

Instantly share code, notes, and snippets.

View frankV's full-sized avatar
🦑
Work Hard. Cuttlesoft.

Frank Valcarcel frankV

🦑
Work Hard. Cuttlesoft.
View GitHub Profile
<script>
document.addEventListener("DOMContentLoaded", function() {
//Get the contents
var source = document.querySelector("#results-template").innerHTML;
//Compile them into a template
template = Handlebars.compile(source);
// add the formatName helper
@frankV
frankV / GrossPelicanLoop.html
Created June 18, 2014 23:57
PelicanArticleLoopHack
<section class="wrapper style1 container special">
<div class="row">
<h2 class="space-above">Latest Posts</h2>
</div>
<div class="row">
{% for article in all_articles %}
{% if loop.index < 4 %}
<div class="4u">
<section>

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
from flask import Flask, render_template, jsonify, request
from threading import Timer, Thread
from time import sleep
app = Flask(__name__)
@app.route("/api/<method>")
def api(method):
data = {
@frankV
frankV / gist:85b0e40ecb86f000a540
Last active August 29, 2015 14:18
a collection of Flask app examples from the #TeachMeFlask Open Workspace at Pycon 2015

A list of Python Flask example project repositories

  1. mattupstate/overholt

Example Flask application illustrating some of [Matt's] common practices blog post

  1. frankV/manekineko

Manekineko is a Flask template/bootstrap/boilerplate application.

  1. miguelgrinberg/microblog

A microblogging web application written in Python and Flask that [Miguel] developed as part of [his] Flask Mega-Tutorial series.blog post

@frankV
frankV / gist:17beb6ef1aab48429197
Created May 1, 2015 15:56
flask.upstart.conf
description "flask example"
author "[email protected]"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
cd /<your-application-path>/
$cordovaOauth.twitter(appConfig.TW_CLIENT_ID, appConfig.TW_SECRET).then(function(result) {
// $localStorage.twitterToken = result.access_token;
console.log(result);
$location.path("/profile");
}, function(error) {
alert("There was a problem signing in! See the console for logs");
console.log(error);
});
@frankV
frankV / .dockerignore
Created December 22, 2015 06:06
Dockerfile for an Ionic Framework Project
Dockerfile
config.xml
.sass-cache
.editorconfig
.io-config.json
.dockerignore
hooks/
platforms/
node_modules/
@frankV
frankV / methods.py
Created February 6, 2016 15:55
python method tutorial for HackFSU
def greeting():
print 'hello'
userInput = raw_input('> ')
print userInput
if userInput == 'foo':
foo()
elif userInput == 'bar':
bar()