Skip to content

Instantly share code, notes, and snippets.

@juliangsp
juliangsp / sublime-command-line.md
Last active February 10, 2022 20:06 — forked from adrianorsouza/sublime-command-line.md
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2, 3, or 4 installed in your system within Applications folder

Setup

@juliangsp
juliangsp / ruby proxy
Created December 16, 2019 17:01 — forked from gmic/ruby proxy
Ruby: install gems behind a proxy
gem install --http-proxy http://user:password@some.proxy.com:8080 bundler
@juliangsp
juliangsp / NSObject+Additions.m
Created October 18, 2018 16:57
Check if subclass overrides a method
// source: https://stackoverflow.com/questions/28737116/check-if-subclass-overrides-a-method
-(BOOL)checkIfObject:(id)object overridesSelector:(SEL)selector {
Class objSuperClass = [object superclass];
BOOL isMethodOverridden = NO;
while (objSuperClass != Nil) {
isMethodOverridden = [object methodForSelector: selector] !=
[objSuperClass instanceMethodForSelector: selector];
@juliangsp
juliangsp / provProfExpiration.sh
Created January 25, 2018 23:49
macOS CLI - Show Apple's iOS Mobile Provisioning Profile Expiration Date
#!/bin/bash
# will display first: 'security: SecPolicySetValue: One or more parameters passed to a function were not valid.', but ignore
# first argument must be file ending in .mobileprovision
security cms -D -i $1 > tmp.plist && /usr/libexec/PlistBuddy -c 'Print :ExpirationDate' tmp.plist; rm tmp.plist
@juliangsp
juliangsp / setBuildNrTo.groovy
Last active May 23, 2017 21:53
Jenkins set next build number
Jenkins.instance.getItemByFullName("jobname").updateNextBuildNumber(5)