Skip to content

Instantly share code, notes, and snippets.

View lukestringer90's full-sized avatar

Luke Stringer lukestringer90

View GitHub Profile
@abdes-zakari
abdes-zakari / mac-git-name-branch.md
Created December 3, 2021 15:23
Add Git Branch Name to Terminal Prompt on Mac (Big Sur)

Add Git Branch Name to Terminal Prompt on Mac (Big Sur)

Open ~/.zprofile or ~/.zshrc in your favorite editor and add the following content to the bottom. ( if the file ~/.zprofile or ~/.zprofile does not already exist create it)

# Git branch in prompt.
function parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UnifiedBar</key>
<dict>
<key>DisclosureRequired</key>
<string>ace440ac-b4f6-4b43-aade-02bba1589aef</string>
<key>Enabled</key>
<false/>
@reinvanoyen
reinvanoyen / terminal-prompt-git-branch-zsh.md
Last active June 17, 2024 13:46
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot

@DrewML
DrewML / Theming-Slack-OSX.md
Last active January 25, 2022 00:53
Theming Slack for OSX

Theming Slack for OSX

So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode!

Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.

But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.

How to (OSX Only)

@drblue
drblue / fix_onedrive.sh
Last active April 16, 2024 21:54
Fix OneDrive for Mac CPU usage
#!/bin/bash
## Fix OneDrive for Mac CPU usage
##
## Seems this is still a problem 5 years later after I created this little gist.
## I have long since stopped using OneDrive (luckily), but according to
## comments below, I have added the new path for OfficeFileCache for macOS
## Mojave (10.14) and Catalina (10.15).
## Run this on macOS Mojave (10.14) and Catalina (10.15)
find ~/Library/Containers/ -type d -name OfficeFileCache -exec rm -r {} +
@chriseidhof
chriseidhof / LICENSE
Last active July 16, 2019 13:14
A tiny networking library
Copyright 2015 Chris Eidhof
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 copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHE
@kristopherjohnson
kristopherjohnson / KDJFetchedResultsControllerContentUpdater.h
Last active January 2, 2016 05:29
General-purpose implementation of NSFetchedResultsControllerDelegate
#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
// Protocol adopted by an object that can configure a table view cell with data from an object
@protocol KDJTableViewCellConfigurationDelegate <NSObject>
- (void)configureCell:(UITableViewCell *)cell withObject:(NSObject *)object;
@end
// General-purpose implementation of NSFetchedResultsControllerDelegate
//
// Copyright (c) 2012-2013 Cédric Luthi / @0xced. All rights reserved.
//
#if TARGET_IPHONE_SIMULATOR
static const char *fakeCarrier;
static const char *fakeTime;
static int fakeCellSignalStrength = -1;
@blork
blork / git-changelog.sh
Last active December 15, 2015 15:19
A shell script which generates a nicely formatted change log between two git commit hashes. To be added as a custom action in Sourcetree.
#! /bin/bash
git log $1...$2 --pretty=format:'• %s' --reverse | grep -v Merge
@alloy
alloy / gist:4952606
Last active August 19, 2020 03:48
Upload iOS application for clients on their iTunes Connect account.

Obviously, the simplest solution would be for the client to share their account details or add us as ‘team admin’, but that is not what this is about.

  1. [Add us to your iOS Developer Program as ‘team member’.][1]
  2. [Create a ‘Distribution Certificate’, if you haven’t got one already.][2]
  3. [Create a ‘App Store Distribution Provisioning Profile’.][3]
  4. [Export the ‘Distribution Certificate’ assets and send the export and password to us.][4] (For security sake, it’s a good idea to send us the password via other means than the exported certificate. E.g. by phone/SMS.)