Skip to content

Instantly share code, notes, and snippets.


Parth Sane Boggartfly

View GitHub Profile

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.

View JSONEncoding.swift
let encodedData = try jsonEncoder.encode(surveyFormResults)
let jsonRespresentation = String(data:encodedData,encoding:.utf8)
Boggartfly / The Technical Interview Cheat
Created Sep 26, 2018 — forked from tsiege/The Technical Interview Cheat
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

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
Boggartfly / Create iOS Icons.jsx
Last active Sep 4, 2016 — forked from twonjosh/Create iOS Icons.jsx
Photoshop Script to Create iOS Icons from a source image
View Create iOS Icons.jsx
// Photoshop Script to Create iPhone Icons from iTunesArtwork
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones
View WinForms Scaling Code.txt
var graphics = Graphics.FromHwnd(IntPtr.Zero); // This gets the graphics configuration of the current screen
var scaleX = graphics.DpiX / 96; // 96 was our standard design DPI, remember?
var scaleY = graphics.DpiY / 96;
this.button1.Location = new System.Drawing.Point((int)Math.Round(20 * scaleX), (int)Math.Round(20 * scaleY));
this.button2.Location = new System.Drawing.Point((int)Math.Round(30 * scaleX), (int)Math.Round(30 * scaleY));
//Use this with C# and change x,y values.
Boggartfly / oclMat_custom_kernel.cpp
Created Apr 13, 2016 — forked from atinfinity/oclMat_custom_kernel.cpp
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>
Boggartfly / rt_linux.h
Created Dec 1, 2014
patched rt_linux.h file for mt7601u driver
View rt_linux.h
* Ralink Tech Inc.
* 5F., No.36, Taiyuan St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
* (c) Copyright 2002-2010, Ralink Technology, Inc.
* This program is free software; you can redistribute it and/or modify *
package com.username.ussd;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.IBinder;
import android.os.RemoteException;
import android.preference.PreferenceManager;
import android.util.Log;
* 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}.
Boggartfly / struct.c
Last active Aug 29, 2015
Structures in C
View struct.c
struct employee {
int emp_id;
float salary;
char sex;
void main()