Skip to content

Instantly share code, notes, and snippets.

View silnose's full-sized avatar
🏠
Working from home

Silvana Murgo silnose

🏠
Working from home
View GitHub Profile
@michaelevensen
michaelevensen / EmbedViewController.swift
Last active September 5, 2022 07:27
Embed a UIViewController in Container View programatically
// Instantiate
self.mapViewController = self.storyboard?.instantiateViewController(withIdentifier: "MapViewController") as? MapViewController
if let mapViewController = self.mapViewController {
// Add to Container View
self.mapViewContainerView.addSubview(mapViewController.view)
self.addChildViewController(mapViewController)
mapViewController.didMove(toParentViewController: self)
}
@JonCatmull
JonCatmull / file-size.pipe.ts
Last active April 14, 2024 14:27
Angular2 + TypeScript file size Pipe/Filter. Convert bytes into largest possible unit. e.g. 1024 => 1 KB
/**
* @license
* Copyright (c) 2019 Jonathan Catmull.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active November 18, 2025 04:30
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@justincjahn
justincjahn / README.md
Created July 26, 2012 22:55
Address validation using Google Maps

Google Maps Address Verification

The HTML and accompanying scripts in this project demonstrate how to present users with a "did you mean..." style address validation mechanism that helps to ensure accurate addresses for sites that need said information.

Google Maps API Key

The script will need your own API key to function, my key has been redacted.

@danielestevez
danielestevez / gist:2044589
Last active November 6, 2025 20:14
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}