Skip to content

Instantly share code, notes, and snippets.

View ebruning's full-sized avatar

Ethan Bruning ebruning

View GitHub Profile
@ebruning
ebruning / gist:2430066
Created April 20, 2012 16:16
Launch html file in sublime
Mac
"cmd": ["open", "-a", "Google Chrome", "$file"]
Windows
"cmd": ["PATH_TO_YOUR_CHROME", "$file"]
http://stackoverflow.com/questions/8023879/sublime-text-2-keyboard-shortcut-to-open-file-in-chrome
@ebruning
ebruning / file_mode.txt
Created June 11, 2012 20:08
Stop tracking file modes in git
Solution
Luckily, the solution is very simple – tell git to stop tracking filemodes! I set this as a global option, but also had to set it on the repository too as it has a default value set in there. The following two commands sorted it out:
git config --global core.filemode false
git config core.filemode false
http://www.grumpydev.com/2011/01/19/switching-from-cygwin-to-msysgit-git-thinks-everything-has-been-modified/
@ebruning
ebruning / gist:3137894
Created July 18, 2012 18:26
Command line to mute/unmute the volume
Much more geeky (and gratifying) to set up a Cron event to send this command:
osascript -e "set Volume 0"
And one to set it back:
osascript -e "set Volume 10"
http://lifehacker.com/5926577/silencer-mutes-and-unmutes-your-mac-on-a-schedule-every-day
@ebruning
ebruning / gist:3174476
Created July 25, 2012 04:54
Change home and end keys Mac OSX
http://www.samuelhwong.com/blog/2011/08/29/remapping-keyboard-and-mouse-in-mac-os-x-lion/
~/Library/KeyBindings/DefaultKeyBinding.dict
{
/* Remap Home / End to be correct */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */
@ebruning
ebruning / animate_buttons
Created July 16, 2013 17:37
animate buttons
CATransition *animation = [CATransition animation];
animation.type = kCATransitionFade;
animation.duration = 0.4;
[[self.view viewWithTag:Capture].layer addAnimation:animation forKey:nil];
[self.view viewWithTag:Capture].hidden = false;
[[self.view viewWithTag:Submit].layer addAnimation:animation forKey:nil];
[self.view viewWithTag:Submit].hidden = false;
  • Buy a mac mini
  • Install 10.8
  • Create a user account for Jenkins
  • Install xcode
  • Turn on screen sharing
  • Turn off energy save sleeping
  • Login as your jenkins user
  • Use ssh-keygen to create a key for github
  • Create a github account for your build machine
  • Add the key to your build machine github account
@ebruning
ebruning / gist:6084205
Created July 25, 2013 22:03
Restart application
http://stackoverflow.com/questions/5082738/ios-calling-app-delegate-method-from-viewcontroller
http://stackoverflow.com/questions/4399611/force-iphone-app-to-restart-programmatically
// call delegate method
MainClass *appDelegate = (MainClass *)[[UIApplication sharedApplication] delegate];
[appDelegate.viewController resetAppToFirstController];
- (void)resetAppToFirstController
{
@ebruning
ebruning / gist:6159559
Created August 5, 2013 20:59
dump all the font names
for (NSString *familyName in [UIFont familyNames]) {
for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) {
NSLog(@"%@", fontName);
}
}
@ebruning
ebruning / objc.cfg
Created August 15, 2013 02:29 — forked from tszming/objc.cfg
#
# uncrustify config file for objective-c and objective-c++
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
output_tab_size = 4 # new tab size
indent_columns = output_tab_size
indent_label = 2 # pos: absolute col, neg: relative column
indent_align_assign = FALSE
@ebruning
ebruning / gist:6238478
Last active June 13, 2021 17:46
uncrustify settings
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment