Skip to content

Instantly share code, notes, and snippets.

Avatar

Shilo Shilo

View GitHub Profile
@shpakovski
shpakovski / Instructions.md
Last active Dec 15, 2015
How to hide iOS Simulator when you run Xcode Tests.
View Instructions.md
  1. Save Tests.scpt to the folder ~/.Xcode/
  2. Open the folder ~/.Xcode/ in Terminal.app
  3. Perform the command chmod +x ./Tests.scpt in Terminal.app
  4. Open Xcode ➭ Behaviors ➭ Testing Succeeds
  5. Choose ~/.Xcode/Tests.scpt in the Run popup
  6. Open Xcode ➭ Behaviors ➭ Testing Fails and repeat
@Shilo
Shilo / NSString+XML.h
Last active Dec 22, 2015
Customizable string XML parser for NSString, NSMutableString, NSAttributedString, and NSMutableAttributedString.
View NSString+XML.h
//
// NSString+XML.h
// Customizable string XML parser for NSString, NSMutableString, NSAttributedString, and NSMutableAttributedString.
//
// Created by Shilo White on 8/31/13.
// Copyright (c) 2013 XIDA Design & Technik. All rights reserved.
//
#import <Foundation/Foundation.h>
@Shilo
Shilo / Perfect_Convo_With_Boss.txt
Created Apr 14, 2016
Perfect Conversation with Mr. Boss, AKA Benjamin.
View Perfect_Convo_With_Boss.txt
Shilo: Benjamin! Benjamin! Benjamin! Benjamin! Benjamin! Benjamin! Boss! Boss! Boss! Leader! Leader! Leader! Master! Master! Master! Ben!
Ben! Ben! Ben! Benni! Benni! Benni! Benni! Benji! Benji! Benj! Benj! Benj!
Benjamin: What!?
Shilo: Hi! (Giggling and running out of the room)
https://www.youtube.com/watch?v=aOLxQGLJouI
View gist:e470c28b24127f78795f
create dummy images
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png
get page headers
curl --head http://google.com
send parameters to page
curl.exe -L -G "http://yoururl.com" --data-urlencode "text=DESIGN6 daily backup started"
send formdata & files to page
@Shilo
Shilo / defaults.sh
Last active Jun 12, 2016
OS X Useful Terminal Commands
View defaults.sh
//Disable app nap system-wide (Requires Restart)
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
//Finder show hidden files
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder
//Desktop hide icons
defaults write com.apple.finder CreateDesktop false; killall Finder
//TextEdit open new document by default (Requires restart of TextEdit)
@Shilo
Shilo / filename_append_2x.sh
Created Jul 16, 2016
Terminal command to append "@2x" to file names inside current directory.
View filename_append_2x.sh
for file in *; do mv "$file" "${file%.*}@2x.${file##*.}"; done
@jamztang
jamztang / LICENSE
Created Jan 6, 2012
Creating a placeholder UIImage dynamically with color
View LICENSE
Copyright (c) 2013 Jamz Tang <jamz@jamztang.com>
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:
The above copyright notice and this permission notice shall be included in all
@Shilo
Shilo / NavigationController.m
Last active Jul 16, 2016
iOS - Dynamically load navigation bar title image with interpolation. How to use: Set navigation title as "{image_name_here}"
View NavigationController.m
#define NAV_PORTRAIT_HEIGHT 44
- (void)viewDidLoad {
[super viewDidLoad];
[self loadNavigationBarTitleImage];
}
- (void)loadNavigationBarTitleImage {
NSString *title = self.navigationItem.title;
NSInteger prefixLength = NAV_TITLE_IMAGE_PREFIX.length;
@Shilo
Shilo / remove_svn_dirs.sh
Created Oct 24, 2013
Bash script command to recursively remove ".svn" directory from currently directory.
View remove_svn_dirs.sh
rm -rf `find . -type d -name .svn`
@Shilo
Shilo / svn_ignore.sh
Created Sep 6, 2016
Terminal command to add svn ignores via ".gitignore" file.
View svn_ignore.sh
svn propset svn:ignore -RF .gitignore .