Skip to content

Instantly share code, notes, and snippets.

View Satwa's full-sized avatar
:bowtie:
me vs. me

Joshua Satwa

:bowtie:
me vs. me
View GitHub Profile
@mshafer
mshafer / ContentView.swift
Last active May 3, 2023 13:37
Slide-over card (like in Maps or Stocks) using SwiftUI
import SwiftUI
struct ContentView : View {
var body: some View {
ZStack(alignment: Alignment.top) {
MapView()
SlideOverCard {
VStack {
CoverImage(imageName: "maitlandbay")
Text("Maitland Bay")
@fitomad
fitomad / SwiftUI-flip-animation.swift
Last active October 13, 2020 20:14
A SwiftUI animation that represents a flip view to show Q&A cards.
//: A UIKit based Playground for presenting SwiftUI based user interface
// by @fitomad
import UIKit
import SwiftUI
import PlaygroundSupport
// MARK: - Contenedor Principal -
public struct Container: View
@yi
yi / open_app.html
Created February 22, 2017 08:46 — forked from noelrocha/open_app.html
Open app on Google Play or AppStore
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Open App</title>
<!--
URL Params:
customSchemeURL: Your custom scheme app
@trilliwon
trilliwon / uiimage-data.swift
Last active January 12, 2024 14:45
Swift UIImage to Data, Data to UIImage
// Swift4
let image = UIImage(named: "sample")
let data = image?.pngData()
let data = image?.jpegData(compressionQuality: 0.9)
let uiImage: UIImage = UIImage(data: imageData)
// deprecated
// var imageData: Data = UIImagePNGRepresentation(image)
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
@rxnlabs
rxnlabs / php-array-get-all-possibilities-associative.php
Last active July 22, 2019 10:38
PHP - Generate all possible combinations from multidimensional array
// http://www.devnetwork.net/viewtopic.php?f=1&t=133156
function array_cartesian_utm($arrays){
//returned array...
$cartesic = array();
//calculate expected size of cartesian array...
$size=(sizeof($arrays)>0)?1:0;
foreach($arrays as $array){
$size= $size*sizeof($array);
@gpoulter
gpoulter / csv_to_mm.py
Created April 10, 2012 11:32
Build Freemind MindMap from Excel file
#!/usr/bin/python
"""Convert CSV table to MindMap format
Usage: python csv_to_mm.py sometable.csv > mymap.mm
CSV format is rows representing tree leaves, e.g.:
A1,
A1,B1
A1,B1,C1
A1,B1,C2