Skip to content

Instantly share code, notes, and snippets.

Avatar
The time is up

Douglas Brunal Frankity

The time is up
View GitHub Profile
@Frankity
Frankity / Connectivity.java
Created Sep 2, 2020 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
View Connectivity.java
/*
* 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:
View radios.json
{
"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 Nov 23, 2018 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac
View Python3 Virtualenv Setup.md

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
View lal.py
#!/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__)
View py.py
#!/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'
View todos.py
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':
View users.py
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')
View snip.js
<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 / main.vala
Created Oct 7, 2016 — forked from rickybassom/main.vala
Simple Gtk.Application example in vala
View main.vala
using Gtk;
public class MyApplication : Gtk.Application {
public MyApplication () {
Object(application_id: "testing.my.application",
flags: ApplicationFlags.FLAGS_NONE);
}
protected override void activate () {
View run.py
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):