Skip to content

Instantly share code, notes, and snippets.

Carlos García carlosypunto

  • Madrid, Spain
Block or report user

Report or block carlosypunto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
carlosypunto / clean_localizable.swift
Created Dec 8, 2019
Localizable string checker script for use in Xcode project Build Phases
View clean_localizable.swift
#!/usr/bin/xcrun --sdk macosx swift
import Foundation
let fileManager = FileManager.default
//let currentPath = fileManager.currentDirectoryPath
let currentPath = "/Users/carlos/Pecunpay/GeltCash/Implementación/Geltcash"
carlosypunto / Podfile
Created Sep 14, 2018 — forked from arturgrigor/Podfile
Sample Podfile for silencing warnings for CocoaPods dependencies
View Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target '%TargetName%' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
# Pods for %TargetName%
# pod 'FBSDKCoreKit'
carlosypunto /
Created Dec 18, 2017
Function to quickly create an application icon from 1024px master file
function mkicns() {
if [[ -z "$@" ]]; then
echo "Input file missing"
mkdir $filename.iconset
sips -z 16 16 $1 --out $filename.iconset/icon_16x16.png
sips -z 32 32 $1 --out $filename.iconset/icon_16x16@2x.png
sips -z 32 32 $1 --out $filename.iconset/icon_32x32.png
sips -z 64 64 $1 --out $filename.iconset/icon_32x32@2x.png
carlosypunto / mount-vm-sharedfolders.conf
Last active Jan 16, 2017
Mount/unmout vmware shared folders on home directory with owner uid and gid when start/stop Ubuntu desktop session
View mount-vm-sharedfolders.conf
start on desktop-start
stop on desktop-end
vmhgfs-fuse -o uid=`id -u` -o gid=`id -g` ~/vmshare
end script
carlosypunto / gist.swift
Last active Mar 23, 2018
Swift 2 Multiparadigm Decorator Pattern
View gist.swift
// Decorable Protocol --------------------------------------------------------------------
protocol IBeverage {
func description() -> String
func cost() -> Double
extension IBeverage {
func printDescription() {
carlosypunto / gist.swift
Last active Apr 19, 2016
Swift 2 Abstarct Class
View gist.swift
protocol MyInterface {
func myMethod() -> String
extension MyInterface {
func myMethod() -> String {
fatalError("Not Implemented")
View Swift Function composition operator direction
//: Sample based on Function Composition snippet from
import Foundation
func getContents(url: String) -> String {
return NSString(contentsOfURL: NSURL(string: url)!, encoding: NSUTF8StringEncoding, error: nil)! as String
func lines(input: String) -> [String] {
return input.componentsSeparatedByCharactersInSet(NSCharacterSet.newlineCharacterSet())
You can’t perform that action at this time.