Skip to content

Instantly share code, notes, and snippets.

Avatar

Navid Mitchell NavidMitchell

  • Kinotic Foundation
  • Out There
View GitHub Profile
View keybase.md

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:

@NavidMitchell
NavidMitchell / UC_FIRST
Created May 16, 2018
Mysql Capitalize any given string
View UC_FIRST
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));
@NavidMitchell
NavidMitchell / UC_DELIMETER
Last active May 16, 2018
MySQL First letter of each word uppercase
View UC_DELIMETER
// 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 / THXDictionaryMapper
Created Dec 17, 2013
Json to Objective-c un-marshaller
View THXDictionaryMapper
//
// 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"