Skip to content

Instantly share code, notes, and snippets.

View Frankity's full-sized avatar
The time is up

Douglas Brunal Frankity

The time is up
View GitHub Profile
@Frankity
Frankity / main.vala
Created October 7, 2016 01:37 — forked from rickybassom/main.vala
Simple Gtk.Application example in vala
using Gtk;
public class MyApplication : Gtk.Application {
public MyApplication () {
Object(application_id: "testing.my.application",
flags: ApplicationFlags.FLAGS_NONE);
}
protected override void activate () {
@Frankity
Frankity / Connectivity.java
Created September 2, 2020 20:39 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
/*
* Copyright (c) 2017 Emil Davtyan
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
@Frankity
Frankity / radios.json
Last active January 29, 2019 14:49
Radios
{
"data":[
{
"name":"Radio Tiempo Barranquilla",
"url":"http://i60.letio.com/9100.aac"
},
{
"name":"Radio Tiempo Cucuta",
"url":"http://i50.letio.com/9146.aac"
},
@Frankity
Frankity / Python3 Virtualenv Setup.md
Created November 23, 2018 20:43 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from flask import Flask, jsonify
from flask_cors import CORS, cross_origin
from flask_mail import Mail
from flask_sqlalchemy import SQLAlchemy
import os
app = Flask(__name__)
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from api import db
from flask import jsonify
from datetime import datetime
class TodoList(db.Model):
__tablename__ = 'todolist'
from flask import Blueprint, request, jsonify, make_response
from api import db
from api.todos.models import TodoList
mod_todo = Blueprint('todo', __name__, url_prefix='/rest')
@mod_todo.route('/addtodo', methods=['POST'])
def addnewTodo():
if request.method == 'POST':
@Frankity
Frankity / users.py
Last active January 12, 2017 20:49
from flask import Blueprint, request, jsonify, make_response
from flask_cors import CORS, cross_origin
from flask_login import session
import hashlib, os, binascii
from api import db
from api.users.models import Users
mod_users = Blueprint('users', __name__, url_prefix='/rest')
@Frankity
Frankity / snip.js
Last active December 2, 2016 17:43
<div style="width: 100%;height: 100%" id="modals" class="modal fade" role="dialog">
<div style="width: 100%;height: 100%" id="aws"></div>
</div>
<script type="text/javascript">
$.ajax({
url: './views/test.php',
type: 'get',
data: {videoid: id},
@Frankity
Frankity / run.py
Last active August 19, 2016 01:43
from flask import Flask, render_template, redirect, json, request, url_for, jsonify
from flask.ext.sqlalchemy import SQLAlchemy
from werkzeug import generate_password_hash, check_password_hash
from flask.ext.login import login_user , logout_user , current_user , login_required, session, flash
import hashlib
app = Flask(__name__)
db = SQLAlchemy(app)
class Users(db.Model):