Skip to content

Instantly share code, notes, and snippets.

Running away from my issues.

Billcountry Mwaniki Billcountry

Running away from my issues.
Block or report user

Report or block Billcountry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Billcountry / images.js
Last active Feb 4, 2018
Load images after the whole page has loaded by just adding the class .async-img
View images.js
// Default image data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mO8dPv2fwAImAOJMh4kwgAAAABJRU5ErkJggg==
function load_images(){
var images = document.querySelectorAll(".async-img");
for(var id=0; id<images.length; id++){
var image = images[id];
var img_url = image.getAttribute('url');
image.src = img_url;
Billcountry / deploy.php
Last active Feb 3, 2018
This file will deploy your git repository to a php server or the directory it's. It's convenient for cpanel hosting and you can add it's URL as a web-hook so that it's updated every time you push your updates to git.
View deploy.php
ini_set('display_errors', 1);
header('Content-Type: text/plain');
$account = '_YOUR_ACCOUNT_NAME_'; // Example Billcountry
$branch = '_BRANCH_TO_DEPLOY_';
$url = "$account/$repo/archive/$";
echo("Cloning into $url\n");
$path = dirname(__FILE__)."/$";
Billcountry /
Created Nov 8, 2017
A collection of functions that I use to speed up my productivity. Feel free to use them as you wish. Connect's to a database, provides method to insert table, run sql queries, hash using sha256, generate dates with addation or removal of time, log your errors among others
import smtplib
import os
import random
import hashlib
from datetime import datetime
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from validate_email import validate_email
import sqlalchemy
from sqlalchemy import engine
Billcountry / fetch_wrapper.js
Last active Oct 30, 2017
A wrapper for fetch that falls back to Jquery ajax if the fetch api is not available on the browser.
View fetch_wrapper.js
let ajax = function (options) {
function setDefaultVal(value, defaultValue){
return (value === undefined) ? defaultValue : value;
let settings = {
url: setDefaultVal(options.url, ""),
type: setDefaultVal(options.type, "GET"),
headers: setDefaultVal(options.headers, {}),
data: setDefaultVal(, {}),
dataType: setDefaultVal(options.dataType, "text"),
Billcountry /
Last active Sep 29, 2017
An easy way to create personal proxy servers and bouncing your connection off several servers before the connection finally reaches you. Use with caution, am not responsible of your actions.
import sys, thread, socket
Under MIT License
To run Simply
(If you make executable)
./ 8090
python 8090
You can’t perform that action at this time.