Skip to content

Instantly share code, notes, and snippets.

View druvv's full-sized avatar

Dhruv Sringari druvv

  • SmartPass
  • New York, New York
View GitHub Profile
@mohit0749
mohit0749 / GooglePhotosTakeoutHelper.py
Last active October 27, 2024 17:15
GooglePhotosTakeoutHelper
directory = '/path/to/photos'
output_directory = '/path/to/output_directory'
bin_directory = '/path/to/trash_directory'
import json
import os
import shutil
from datetime import datetime
@druvv
druvv / DragSelectContainerView.md
Last active March 5, 2024 16:56
Drag to select multiple views in SwiftUI

DragSelectContainerView

Drag to select multiple views in SwiftUI (Written in Swift 5 / iOS 15)

This wrapper view allows you to select multiple views in SwiftUI. You provide the view frames using a GeometryReader and the functionality to support selecting and deselecting objects. This wrapper takes care of the rest.

//
//  DragSelectContainerView.swift
//
@brennanMKE
brennanMKE / README.md
Last active May 20, 2021 06:21
Weak Object Array which is useful for delegates or any objects which should have a weak reference.

Weak Object Array

Managing a collection a delegates which should have weak references in Swift means allowing for optional and weak object references. Unfortunately there is a bug in Swift 4 which prevents a protocol declared as class to be generically cast to AnyObject. It prevents a generics implementation from being possible. Instead this solution uses AnyObject and provides type specific functions to provide type safety.

@PaulTaykalo
PaulTaykalo / Appfile
Created August 26, 2016 13:05
Fastlane's Appfile for multiple users support
# In big teams instead of specifying one email to rule them all as apple_id
# You can get this information from environment variable
# By doing this it will allow different developers to specify their own apple ids
# And if this env variable is not required - then it will be asked on any command that requires apple_id
apple_id ENV["MY_APP_NAME_APPLE_ID"] # Your Apple email address
### ~/.bashrc of some user
export MY_APP_NAME_APPLE_ID="someuser@gmail.com"
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 3, 2024 12:26
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@hodzanassredin
hodzanassredin / main.go
Created August 14, 2013 07:58
boolean trap solve in golang
package main
import(
"painter"
"fmt"
)
func main(){
res := painter.Repaint(painter.RepaintImmediate(false))
fmt.Println(res)
}