Skip to content

Instantly share code, notes, and snippets.

View Julioacarrettoni's full-sized avatar
🇦🇷

Julio Carrettoni Julioacarrettoni

🇦🇷
View GitHub Profile
@dduan
dduan / EscapingClosurePropertyWrapper.swift
Created July 28, 2020 03:55
This property wrapper guarantees that a closure does nothing if its enclosing object is deinitialized.
@propertyWrapper
struct Escaping {
typealias Closure = () -> Void
var store: Closure
var wrappedValue: Closure {
get { self.store }
set { self.store = newValue }
}
@keith
keith / simctl-commands.txt
Last active December 7, 2022 23:27
All the subcommands of `xcrun simctl` (including ones that aren't listed in `simctl help`) LC_SOURCE_VERSION 776.1 (Xcode 13.0 beta 5)
addmedia
addphoto
addvideo
appinfo
boot
bootstatus
clone
create
darwinup
delete
#!/usr/bin/python3
'''
Display CPU usage for a given process
emoji ref: https://github.com/sheagcraig/Spruce/blob/master/spruce.py
'''
import subprocess
import time
import argparse
@nicnocquee
nicnocquee / my_alias.sh
Last active April 24, 2017 06:51
my shell alias
# Color LS
colorflag="-G"
alias ls="command ls ${colorflag}"
alias l="ls -lF ${colorflag}" # all files, in long format
alias la="ls -laF ${colorflag}" # all files inc dotfiles, in long format
alias lsd='ls -lF ${colorflag} | grep "^d"' # only directories
alias lsa="command ls -la | lolcat"
# Quicker navigation
alias ..="cd .."
@ArtSabintsev
ArtSabintsev / git_aliases.sh
Created April 20, 2017 20:22
Useful Git Aliases
alias ga='git add . && git status'
alias gb='git branch'
alias gbd='git branch -D'
alias gch='git checkout'
alias gcam='git commit -am'
alias gp='git push'
alias gpo='git push origin'
alias gs='git status'
alias gu='git pull --all && git fetch -p && git branch --merged | grep -v '^*' | grep -v master | grep -v develop | xargs -n 1 git branch -d && git branch -a'
alias gclean='git clean -fd && git reset && git checkout -f && git status'
fastlane_version "1.33.0"
default_platform :ios
platform :ios do
before_all do
cocoapods
ENV['KEYCHAIN_NAME'] = "TempKeychain.keychain"
end
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
@borlaym
borlaym / animals.json
Created December 15, 2014 13:38
Array of animal names
[
"Aardvark",
"Albatross",
"Alligator",
"Alpaca",
"Ant",
"Anteater",
"Antelope",
"Ape",
"Armadillo",
@rrenna
rrenna / gist:ec2fa0dc5707d6ae4411
Last active August 29, 2015 14:10
Example of odd UIAppearance proxy behaviour in iOS 8.1. When implemented this way, the labels used in controls which should be outside the scope of your app, like the iOS share sheet, are also modified.
// Extend UILabel with a method which sets font, to be used by UIAppearance
extension UILabel
{
func setFontName(fontName:String)
{
self.font = UIFont(name: fontName, size: self.font.pointSize)
}
}
// Somewhere in the code, call the extension method on the UIAppearance proxy object of UILabel, example:
@bjhomer
bjhomer / pprofile.py
Created June 25, 2014 16:39
A simple python script to more easily inspect provisioning profiles.
#! /usr/bin/python
import sys
import os
def main():
if len(sys.argv) < 2:
print "Usage: profile.py <path> | <UUID>"
sys.exit()