Skip to content

Instantly share code, notes, and snippets.

View NavidMitchell's full-sized avatar

Navid Mitchell NavidMitchell

  • Kinotic Foundation
  • Out There
View GitHub Profile
@NavidMitchell
NavidMitchell / THXDictionaryMapper
Created December 17, 2013 17:41
Json to Objective-c un-marshaller
//
// THXDictionaryMapper.m
// Spark
//
// Created by Navid Mitchell on 6/19/13.
// Copyright (c) 2013 Navid Mitchell. All rights reserved.
//
#import "THXDictionaryMapper.h"
#import "objc/runtime.h"
@NavidMitchell
NavidMitchell / UC_DELIMETER
Last active May 16, 2018 19:50
MySQL First letter of each word uppercase
// Mysql function to make begining of word uppercase
// https://www.thingy-ma-jig.co.uk/blog/30-09-2010/mysql-how-upper-case-words
DROP FUNCTION IF EXISTS UC_DELIMETER;
DELIMITER //
CREATE FUNCTION UC_DELIMETER(oldName VARCHAR(255), delim VARCHAR(1), trimSpaces BOOL) RETURNS VARCHAR(255)
BEGIN
SET @oldString := oldName;
SET @newString := "";
tokenLoop: LOOP
@NavidMitchell
NavidMitchell / UC_FIRST
Created May 16, 2018 19:57
Mysql Capitalize any given string
DROP FUNCTION IF EXISTS UC_FIRST;
CREATE FUNCTION UC_FIRST(oldWord VARCHAR(255)) RETURNS VARCHAR(255)
RETURN CONCAT(UCASE(SUBSTRING(oldWord, 1, 1)),SUBSTRING(oldWord, 2));

Keybase proof

I hereby claim:

  • I am NavidMitchell on github.
  • I am navidmitchell (https://keybase.io/navidmitchell) on keybase.
  • I have a public key whose fingerprint is 133D BE87 8D7D 23C6 70EB 4E17 0DFF 039A C1F5 67EA

To claim this, I am signing this object: