Skip to content

Instantly share code, notes, and snippets.

View mikedfunk's full-sized avatar

Mike Funk mikedfunk

View GitHub Profile
@mikedfunk
mikedfunk / zonos-openapi.yml
Last active October 19, 2023 00:51
zonos-openapi.yml
openapi: 3.1.0
info:
title: Zonos
version: 0.1.0
servers:
- url: https://api.zonos.com/v1
description: main
paths:
/landed_cost:
post:
@mikedfunk
mikedfunk / gist:1370989
Created November 16, 2011 19:02
Using MySQL NOW() in Codeigniter
<?php
// Using MySQL NOW() in Codeigniter
// by daveganley
// There are two easy ways to do this
// With NOW()
$data = array(
'field_name' => 'some_data'
);

Examples with ascending order


E.g. Move D to B (no room for any)

Start:

id order
@mikedfunk
mikedfunk / file_append.php
Created October 4, 2013 21:38
Laravel file append
<?php
File::append(app_path().'/queue.txt', 'nice'.PHP_EOL);
@mikedfunk
mikedfunk / README.md
Created August 28, 2012 21:17
CodeIgniter Pagination for Twitter Bootstrap

This uses Twitter Bootstrap classes for CodeIgniter pagination.

Drop this file into application/config.

@mikedfunk
mikedfunk / bash_cheatsheet.md
Last active January 6, 2021 16:58
cheatsheets

bash cheatsheet

some stuff I still need to memorize

c-a move to beginning of line
<?php
declare(strict_types=1);
namespace SaatchiArt\BentoBoxDDD\Domain\Users;
use SaatchiArt\BentoBoxDDD\Domain\Artworks\ArtworkService;
use SaatchiArt\BentoBoxDDD\SecondaryAdapters\Repositories\UserRepository;
final class UserService
<?php
declare(strict_types=1);
namespace SaatchiArt\BentoBoxDDD\Services\UserActions;
use SaatchiArt\BentoBoxDDD\Services\UserActions\SecondaryAdapters\Repositories\UserRepositoryInterface as UserRepository;
final class UserService
{
test111
@mikedfunk
mikedfunk / logger.php
Created September 8, 2015 18:31
php one-liner to write to a file (log)
// This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file.
file_put_contents($filename, $message, FILE_APPEND);