Skip to content

Instantly share code, notes, and snippets.


Parth Sane Boggartfly

View GitHub Profile
craiggrummitt / SKMultilineLabel.swift
Last active Apr 11, 2020
Multi line label in Sprite Kit in Swift
View SKMultilineLabel.swift
// SKMultilineLabel.swift
// Created by Craig on 10/04/2015.
// Copyright (c) 2015 Interactive Coconut.
// MIT License,
/* USE:
(most component parameters have defaults)
let multiLabel = SKMultilineLabel(text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", labelWidth: 250, pos: CGPoint(x: size.width / 2, y: size.height / 2))
kristopherjohnson / utcDateTime.m
Last active Dec 8, 2017
Get UTC date/time string for current time using NSCalendar
View utcDateTime.m
NSDate *date = [NSDate date];
NSCalendar *utcCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
utcCalendar.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];
unsigned ymdhmsUnitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay| NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;
NSDateComponents *utcDateComponents = [utcCalendar components:ymdhmsUnitFlags fromDate:date];
// Create string of form "yyyy-mm-dd hh:mm:ss"
atinfinity / oclMat_custom_kernel.cpp
Last active Sep 23, 2020
sample code to execute custom OpenCL kernel on OpenCV 2.4.9
View oclMat_custom_kernel.cpp
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/ocl/ocl.hpp>
// cl_mem構造体を参照するためにインクルード
#if defined __APPLE__
#include <OpenCL/cl.h>
#include <CL/cl.h>
TSiege / The Technical Interview Cheat
Last active Oct 19, 2021
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat


I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!


lttlrck / gist:9628955
Created Mar 18, 2014
rename git branch locally and remotely
View gist:9628955
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
joshdholtz /
Last active Sep 26, 2021
Android Google Maps V2 - MapView in XML
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.


The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

imminent /
Created Nov 12, 2012
Utility to retrieve user profile on Android device
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session
* app.
* @author Dandré Allison
public class AccountUtils {
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}.
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name: