Skip to content

Instantly share code, notes, and snippets.

@whipowill
whipowill / install_diablo2_on_mac.md
Last active May 23, 2022 04:28
Install Diablo II on Mac OSX
@joshdholtz
joshdholtz / Fastfile
Created May 29, 2019 03:03
Restart Fastlane::BuildWatcher and call Pilot::BuildManager.new.distribute
# fastlane watch_and_dist
# or
# fastlane watch_and_dist username:"your@email.com" team_name:"Team Name" app_identifier:"com.your_app" version:"1.1" build_number:"239" groups:"Group1,Group2"
lane :watch_and_dist do |options|
# Set ENVs for Spaceship and Pilot
ENV['FASTLANE_USER'] ||= options[:username]
ENV['FASTLANE_ITC_TEAM_NAME'] ||= ENV['FASTLANE_TEAM_NAME'] = options[:team_name]
# Prompt for needed app/build info
app_identifier = options[:app_identifier] || UI.input("App Identifier")
@tclementdev
tclementdev / libdispatch-efficiency-tips.md
Last active April 26, 2024 10:15
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse

@philipjewell
philipjewell / photobucket_bulk_download.md
Last active March 29, 2023 00:23
Download all your photobucket images in bulk via CLI

backstory

On Jul 4, 2017 theverge.com posted an article about photobucket (silently) no longer allowing their users to source their images on 3rd party websites for free, thus leaving websites all over the web broken displaying the following image in replace:

Me being one of those individual, I attempted to go into my photobucket account and download my content as I now have my own hosting I am able to store those images on; however, the only ways to bulk download (on desktop) is by downloading albums through their interface. Doing so, gave me the following error message: "Hmmm. Something didn't click. Want to give it another shot? Try again now."

Doing this serveral times, in different browsers (chrome, firefox and safari), after disabling all my addons and extensions (including ad blockers), it still didn't work.

At this point, doing anything on their website w

@joshdholtz
joshdholtz / .env
Last active December 26, 2023 13:31
Using Dotenv and environment variables with fastlane
STUFF = this is some stuff
@keeth
keeth / release.rb
Created August 10, 2016 05:54
Programmatically/script release an iOS app with Spaceship
#!/usr/bin/env ruby
require 'spaceship'
Spaceship::Tunes.login(ENV['FASTLANE_USER'], ENV['FASTLANE_PASSWORD'])
app_id = ARGV.shift
if app_id.nil?
abort('Usage: release.rb com.mycompany.myapp')
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote