Skip to content

Instantly share code, notes, and snippets.

View alimashuri's full-sized avatar

Ali Mashuri alimashuri

View GitHub Profile
/**
* Check if contact is already registered with mimetype
*
* @param resolver content resolver
* @param id user id
* @return boolean
*/
private fun isAlreadyRegisteredMimeType(resolver: ContentResolver, id: String, mimeType: String): Boolean {
@alimashuri
alimashuri / GradView.swift
Created March 22, 2017 03:37
Gradient View Helper
//
// GradView.swift
//
//
// Created by Ali Mashuri on 3/22/17.
// Copyright © 2017 Ali Mashuri. All rights reserved.
//
import Foundation
import UIKit
@alimashuri
alimashuri / step01.php
Created July 6, 2011 08:36 — forked from gatesvp/step01.php
PHP commands for basic MongoDB operations
<?php
try {
$mongo = new Mongo(); // default host:port
$db = $mongo->example;
$collection = $db->test;
$document = array('x' => 1);
$collection->insert($document);
print_r($document);