Skip to content

Instantly share code, notes, and snippets.

View abel-masila's full-sized avatar
⚛️
Shipping code!

Abel Masila abel-masila

⚛️
Shipping code!
View GitHub Profile
@abel-masila
abel-masila / index.php
Created July 13, 2016 09:16
A simple USSD registration application written in PHP
<?php
/* Simple sample USSD registration application
* USSD gateway that is being used is Africa's Talking USSD gateway
*/
// Print the response as plain text so that the gateway can read it
header('Content-type: text/plain');
/* local db configuration */
$dsn = 'mysql:dbname=dbname;host=127.0.0.1;'; //database name
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Xml;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
@abel-masila
abel-masila / Product.cs
Last active December 21, 2016 10:20
The Model
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace ProductsApp.Models
{
public class Product
{
@abel-masila
abel-masila / ProductController.cs
Created December 21, 2016 10:14
The Controller
using ProductsApp.Context;
using ProductsApp.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
namespace ProductsApp.Controllers
@abel-masila
abel-masila / ProductContext.cs
Created December 21, 2016 10:16
Db Context
using ProductsApp.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
namespace ProductsApp.Context
{
public class ProductContext:DbContext
@abel-masila
abel-masila / Product.cs
Created February 13, 2017 10:12
ProductsApp Simple ASP.NET/C#API2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace ProductsApp.Models
{
public class Product
{
//The Model
87DQC-G8CYR-CRPJ4-QX9K8-RFV2B ( Ultimate Version)
KCQWK-Q43V3-M3F2T-83VGV-Y6VTX (Professional Version)
TTDB9-9YPYH-7FBVY-X2CTQ-D8F2H (Test Professional Version)
P27TG-XXX2W-XK8TK-QD9FK-V36W4 (Premium & Express Version)
6T3MC-YX8XF-7CWXW-462TQ-8G2B4 (Team Foundation Server)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankApp
{
public static class Bank
{
What would happen if you woke up tomorrow and found that your boss had doubled your salary?
Well, on January 5 1914, Henry Ford doubled salaries for all his employees. That simple fact revolutionized the auto industry. Ford's actions may noy have been led by altruistic intentions but he realized that an economy that works for only a few is no economy at all.
It is of no use to be the only well-off person in your family or among your friends. It is of no-use to be super rich in a society of poor people.
This is already back-firing for the elites in Kenya . At first they thought; "if i have a good job, can afford to drive a good car and sleep in a good apartment, I just don't care what happens with the rest."
Little did they know that this just made their lives worse in the longterm. Henry Ford doubled his employees' salaries so they could afford to buy the cars they manufactured. That act alone created market for his products and profits more than trippled.
<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="col-sm-6 col-xs-12">
<div class="row">
<form id="comment_form" action="form.php" method="post" data-success="Thanks for your enquiry, we'll be in touch shortly." data-error="Please fill in all fields correctly.">
<div class="col-sm-6 col-xs-12"> <label>Your Name:</label> <input type="text" name="Name" class="validate-required"> </div>
<div class="col-sm-6 col-xs-12"> <label>Email Address:</label> <input type="email" name="Email" class="validate-required validate-email"> </div>