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
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Dinabase Class
*
* @package CodeIgniter
* @subpackage Libraries
* @author Kader Bouyakoub <[email protected]>
* @link http://www.bkader.com/
* @license MIT, DBAD
@otengkwame
otengkwame / Arr.php
Created June 20, 2020 01:06 — forked from bkader/Arr.php
This class, taken from Fuelphp, allows you to operate on php arrays in CodeIgniter or other php application.
<?php
(defined('BASEPATH')) OR exit('No direct script access allowed');
/**
* CI_Arr - Arr.php
*
* This class was taken from Fuelphp and adapted to be used with CodeIgniter.
*
* @package CodeIgniter
* @category Core
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* CodeIgniter Filebase Class
*
* HOW TO USE - see at the bottom of the file.
*
* @package CodeIgniter
* @subpackage Third Party
server {
listen 80;
server_name www.justwriting.com;
root /data/web/www.justwriting.com;
index index.html index.php;
# set expiration of assets to MAX for caching
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
@otengkwame
otengkwame / blog.php
Created May 18, 2020 15:49 — forked from weatheredwatcher/blog.php
How to Build a Blog in 15 Minutes (using Codeigniter)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Blog extends CI_Controller {
function __construct()
{
parent::__construct();
}
function index()
@otengkwame
otengkwame / Props
Created April 22, 2020 11:45 — forked from mynameispj/Props
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/
@otengkwame
otengkwame / console.js
Created December 16, 2019 16:59 — forked from Harshmakadia/console.js
Mastering JS console like a Pro
// time and time end
console.time("This");
let total = 0;
for (let j = 0; j < 10000; j++) {
total += j
}
console.log("Result", total);
console.timeEnd("This");
// Memory
@otengkwame
otengkwame / index.html
Created July 27, 2019 01:59
Week #6 :: Music Player :: RV Code Challenge
<div class="player" data-player data-playlist="boxer" data-track="0">
<div class="player__content">
<div class="player__artist has-fade-in" data-player-album-artist>Tronix</div>
<div class="player__album has-fade-in" data-player-album-name>Sonar</div>
<div class="player__track has-fade-in" data-player-album-song>Mosh Pit</div>
<div class="album album--boxer" data-album>
<div class="album__cover"></div>
@otengkwame
otengkwame / setFolderPerms.sh
Created July 15, 2019 14:28 — forked from jones139/setFolderPerms.sh
CodeIgniter/Bonfire - Set correct file/folder permissions for bonfire admin functions.
#!/bin/sh
# This should be run from the main CI/bonfire directory (the one that contains index.php)
# The writeableFiles list of filenames is relative to the bonfire/application directory.
# You probably need to run this as root for chgrp to work.
# Graham Jones, 08Oct2011
writeableFiles="../modules cache logs config archives db/backups db/migrations config/development config/production config/testing config/application.php config/config.php"
cd bonfire/application
@otengkwame
otengkwame / remove_checkout_fields.php
Created June 17, 2019 16:50 — forked from cryptexvinci/remove_checkout_fields.php
Remove fields from WooCommerce checkout page.
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' );
function custom_remove_woo_checkout_fields( $fields ) {
// remove billing fields
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);