Skip to content

Instantly share code, notes, and snippets.

//
// CameraController.swift
//
import AVFoundation
import Photos
import UIKit
class CameraController: UIViewController {
enum Camera {
@zinwalin
zinwalin / git-submodules.md
Created April 13, 2021 10:23 — forked from slavafomin/git-submodules.md
Git submodules best practices

Git submodules best practices

Useful commands

— Clone repository with submodules automatically:

git clone --recursive git@github.com:name/repo.git

— Initialize submodules after regular cloning:

@zinwalin
zinwalin / iOSDevices
Created February 22, 2021 10:19
List of iOS devices with names and cpu models
{
"iPhone1,1":
{
"name": "iPhone",
"cpu": "RISC ARM 11"
},
"iPhone1,2":
{
"name": "iPhone 3G",
@zinwalin
zinwalin / ActivityA.java
Created March 3, 2016 07:19
Stackoverflow answer, "Singleton in Android"
package com.example.testSingleton;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
public class ActivityA extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze
#
#Needed to install TileMill from MapBox
#
#Installs node.js which has npm bundled
#
#Build Dependencies
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev