Skip to content

Instantly share code, notes, and snippets.

Avatar
🔬
R&D

Maz Jaleel Mazyod

🔬
R&D
View GitHub Profile
@Mazyod
Mazyod / Dockerfile
Last active Jan 5, 2016
Poco C++ Backend Starter Dockerfile
View Dockerfile
FROM ubuntu
MAINTAINER Maz Jaleel <mazjaleel@gmail.com>
# Install necessary tools to build Poco
RUN apt-get update && apt-get install -yq \
unzip wget build-essential cmake \
openssl libssl-dev \
unixODBC unixODBC-dev odbc-postgresql
View GenericKVStore.java
import java.util.HashMap;
import java.util.Map;
public class Driver {
static Map<String, Object> KeyValueStore = new HashMap<String, Object>();
public static void main(String[] args) throws Exception {
@Mazyod
Mazyod / NullabilityProtocol.swift
Created Nov 5, 2015
Nullablility Oriented Programing
View NullabilityProtocol.swift
public protocol StoreEntryNullability {}
public struct StoreEntryNullable: StoreEntryNullability {}
public struct StoreEntryNonnull: StoreEntryNullability {}
public protocol StoreGroup {
typealias StorageType
typealias StorageNullability: StoreEntryNullability
}
@Mazyod
Mazyod / recursive-bundle.swift
Last active Oct 7, 2015
recursively get files with certain data type from NSBundle
View recursive-bundle.swift
extension NSBundle {
func recursivePathsForResources(type type: String) -> [NSURL] {
// Enumerators are recursive
let enumerator = NSFileManager.defaultManager().enumeratorAtPath(bundlePath)
var filePaths = [NSURL]()
while let filePath = enumerator?.nextObject() as? String {
View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@Mazyod
Mazyod / CGImage+Shapes
Last active Aug 29, 2015
Cross platform shapes images using CGImage. Elegantly created using swift and swifty conventions. See more at https://github.com/Mazyod/MazKit
View CGImage+Shapes
//
// CGImage+Shapes.swift
// MazKit
//
// Created by Mazyad Alabduljaleel on 3/22/15.
// Copyright (c) 2015 ArabianDevs. All rights reserved.
//
import CoreGraphics
View BlankSprite.cpp
Sprite *createBlankSprite(const Color4B& color, Size size)
{
GLubyte *buffer = (GLubyte *)malloc(sizeof(GLubyte)*4);
buffer[0] = color.r;
buffer[1] = color.g;
buffer[2] = color.b;
buffer[3] = color.a;
auto tex = new Texture2D();
tex->initWithData(buffer, sizeof(GLubyte)*4, Texture2D::PixelFormat::RGBA8888, 1, 1, size);
View UIViewController+DismissOnTapOutside.h
//
// UIViewController+DismissOnTapOutside.h
// Telly
//
// Created by Mazyad Alabduljaleel on 5/8/14.
// Copyright (c) 2014 Telly, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
You can’t perform that action at this time.