This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from app import (app, logging) | |
from flask import (render_template, make_response, request, jsonify) | |
from random import shuffle | |
from pyga.requests import Tracker, Page, Session, Visitor, Event | |
import redis | |
r = redis.StrictRedis(host='localhost', port=6379, db=0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sending onDemand premium messages | |
require_once('AfricasTalkingGateway.php'); | |
$username = "MyAfricasTalkingUsername"; | |
$apikey = "MyAfricasTalkingAPIKey"; | |
$recipient = "+254711XXXYYY"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exception: /build/grive2-njjCJE/grive2-0.5/libgrive/src/http/CurlAgent.cc(191): Throw in function long int gr::http::CurlAgent::ExecCurl(const string&, gr::DataStream*, const gr::http::Header&) | |
Dynamic exception type: boost::exception_detail::clone_impl<gr::http::Error> | |
[gr::expt::BacktraceTag*] = #0 0x506f9e grive gr::Exception::Exception() | |
#1 0x4e67d7 grive gr::http::Error::Error() | |
#2 0x4e5e51 grive gr::http::CurlAgent::ExecCurl(std::string const&, gr::DataStream*, gr::http::Header const&) | |
#3 0x4e60fe grive gr::http::CurlAgent::Request(std::string const&, std::string const&, gr::SeekStream*, gr::DataStream*, gr::http::Header const&) | |
#4 0x4ee180 grive gr::AuthAgent::Request(std::string const&, std::string const&, gr::SeekStream*, gr::DataStream*, gr::http::Header const&) | |
#5 0x4e167c grive gr::v2::Syncer2::Upload(gr::Resource*) | |
#6 0x4e00aa grive gr::v2::Syncer2::Create(gr::Resource*) | |
#7 0x4d1efe grive gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import sbtassembly.AssemblyKeys._ | |
object Build extends Build { | |
val akkaVersion = "2.3.3" | |
val sprayVersion = "1.3.1" | |
connectInput in run := true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//I have created table users with columns username varchar(30), phonenumber varchar(20), city varchar(30), status enum('ACTIVE', 'SUSPENDED') | |
//and table session_levels with columns session_id varchar(50), phoneNumber varchar(25), level tinyint(1) | |
/*This code just shows the registration part but not the booking*/ | |
if(!empty($_POST)){ | |
require_once('sankaraDB.php'); | |
require_once('AfricasTalkingGateway.php'); | |
require_once('config.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Specify your login credentials | |
$username = "the_USERNAME"; | |
$apikey = "the_APIKEY"; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This allows you to connect to your DB | |
//connection credentials | |
$servername = getenv("IP"); | |
$username = getenv("C9_USER"); | |
$password = ""; | |
$database = "lakehub"; | |
$dbport = 3306; | |
//Connect to DB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 4; | |
user www www ; | |
error_log /var/log/nginx/error.log; | |
pid /var/log/nginx/nginx.pid; | |
include /opt/nginx/sites-enabled/*; | |
worker_rlimit_nofile 8192; | |
events { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: autobay | |
vars_files: | |
- vars/main.yml | |
remote_user: root | |
tasks: | |
- name: Add Nginx repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hackathon Ideas: | |
http://hackathon-in-a-box.org/guide/ | |
http://www.squirrly.co/a-beginners-guide-to-hackathon#.VNHwklSUc8o | |
http://www.socrata.com/open-data-field-guide/how-to-run-a-hackathon/ | |
http://hackdaymanifesto.com/ | |
https://hackathon.guide/ | |