Skip to content

Instantly share code, notes, and snippets.

View otengkwame's full-sized avatar
💭
Cooking some open source projects

Kwame Oteng Appiah-Nti otengkwame

💭
Cooking some open source projects
View GitHub Profile
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active February 10, 2025 02:48
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@iamfaisal
iamfaisal / Web.config
Created August 9, 2015 11:38
Web.config for Codeigniter 3.0
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rule" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<?php
/*
(2014) Main source -> http://lancenewman.me/posting-a-photo-to-instagram-without-a-phone/
I just managed to sniff Instagram traffic and fixed the code
-- Have fun - batuhan.org - Batuhan Katırcı
--- for your questions, comment @ http://batuhan.org/instagram-photo-upload-with-php/
@ianmustafa
ianmustafa / index.php
Last active April 5, 2023 19:45
Composer Autoload in CodeIgniter. This method provides Cmposer autoloader to be loaded before CodeIgniter classes. Useful to be used with dotenv file using PHP Dotenv package by josegonzalez.
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2015, British Columbia Institute of Technology
*
@kjbrum
kjbrum / search_for_value.php
Last active March 20, 2021 06:24
Check if a value exists in an array/object.
<?php
/**
* Check if an array is a multidimensional array.
*
* @param array $arr The array to check
* @return boolean Whether the the array is a multidimensional array or not
*/
function is_multi_array( $x ) {
if( count( array_filter( $x,'is_array' ) ) > 0 ) return true;
return false;
@wmandai
wmandai / Codeigniter IIS web.config
Last active August 11, 2023 06:24
IIS web.config for codeigniter
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Index">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@sunel
sunel / Debug.php
Created January 30, 2015 10:48
PHP Pretty var_dump
<?php
class Debug {
/**
* A collapse icon, using in the dump_var function to allow collapsing
* an array or object
*
* @var string
*/
@deanstalker
deanstalker / bootstrap-processing.js
Created January 12, 2015 02:05
Bootstrap 3 Modal Processing Dialog
var app;
app = app || (function () {
var process = $('<div class="modal modal-static fade" id="processing-modal" role="dialog" aria-hidden="true" data-keyboard="false" data-backdrop="static" style="overflow: hidden;"><div class="modal-dialog" style="width: 180px;"><div class="modal-content"><div class="modal-body"><div class="text-center"><i class="fa fa-spinner fa-spin" style="font-size: 64px;"></i><h4>Processing...</h4></div></div></div></div></div>');
return {
showProcess: function () {
process.modal('show');
},
hideProcess: function () {
process.modal('hide');
}
<?php
class BaseIntEncoder {
//const $codeset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
//readable character set excluded (0,O,1,l)
const codeset = "23456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ";
static function encode($n){
$base = strlen(self::codeset);
@kajnelissen
kajnelissen / BookingService.php
Last active February 27, 2025 19:32
Constructor Injection in CodeIgniter controllers. Also resolves nested dependencies.
<?php namespace Nelissen\LooseCI\Services;
use Nelissen\LooseCI\Repositories\Room\RoomRepositoryInterface;
use Nelissen\LooseCI\Repositories\Booking\BookingRepositoryInterface;
use Nelissen\LooseCI\Repositories\Booker\BookerRepositoryInterface;
use Nelissen\LooseCI\Models\Room;
use Nelissen\LooseCI\Models\Booker;
use Nelissen\LooseCI\Exceptions\BookingExceedsRoomCapacityException;
/**