Skip to content

Instantly share code, notes, and snippets.

View profnandaa's full-sized avatar
🙃
/dev

Anthony Nandaa profnandaa

🙃
/dev
View GitHub Profile

Keybase proof

I hereby claim:

  • I am profnandaa on github.
  • I am profnandaa (https://keybase.io/profnandaa) on keybase.
  • I have a public key whose fingerprint is 0C35 8782 6463 D654 B4F5 66B1 AB30 3CCA 6093 30BD

To claim this, I am signing this object:

@profnandaa
profnandaa / 0-Messenger-Bot.md
Last active April 19, 2018 20:51
Introduction to Facebook Messenger Bots - @DevC-Nairobi

Building a Basic Messenger Bot with Node.js

For this tutorial, you need just basic understanding of JavaScript. The aim of this tutorial is to show you how easy it is to build messenger bots. When you scroll down this page, you will find out the actual lines of code that we will write are just about 19 LOC.

Prerequisites

const Developer = require('developer');
let months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
let year = (new Date()).getFullYear();
let you = new Developer();
while (year >= 2016) {
months.forEach((m, i) => {
you.attendMonthlyForLoopEvent(m);
you.shareExperience();
<?php
// Our previous code, getting details from MPesa IPN
// send SMS (AfricasTalking API)
$recipients = "+" . $_REQUEST["mpesa_msisdn"];
$message = "Dear " . $_REQUEST["mpesa_sender"] . ", we acknowledge receipt of Ksh. " . $_REQUEST["mpesa_amt"] . " for " . $_REQUEST["mpesa_acc"] . ". Thanks for your support and God bless. FOCUS - Reaching Students Changing Nations.";
include_once("sms/send_sms.php");
@profnandaa
profnandaa / algos-prep
Created October 14, 2014 08:33
Excercises for improving your algorithms skills.
https://code.google.com/p/prep/wiki/ExercisesList
@profnandaa
profnandaa / git-snippets
Created June 30, 2014 06:30
Git snippets and fixes.
git reset --hard # removes staged and working directory changes
git clean -f -d # remove untracked files
git clean -f -x -d # CAUTION: as above but removes ignored files like config.
@profnandaa
profnandaa / gist:4964904
Last active December 13, 2015 19:48
Kenya Presidential Candidates 2013 URLs
[
{
'name':'Martha Karua',
'twitter':'MarthaKarua',
'website': 'http://www.joinmarthakarua.com',
'mzalendo': 'http://info.mzalendo.com/person/martha-karua/',
'mavulture': ''
},
{
'name':'Musalia Mudavadi',
application: filehangar
version: live
runtime: python
api_version: 1
handlers:
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin