Skip to content

Instantly share code, notes, and snippets.

View seifscape's full-sized avatar
:octocat:

Seif Kobrosly seifscape

:octocat:
View GitHub Profile
#!/usr/bin/env bash
#
# Originally from https://gist.github.com/IanVaughan/2902499
#
# authors: Ian Vaughan
# Jacob Zimmerman
#
# usage: uninstall_gems [<version> ...]
#
# examples:
@kristopherjohnson
kristopherjohnson / reconfigureVisibleCells.m
Last active January 16, 2020 18:59
Update visible cells from a UITableViewController without calling -[UITableView reloadData]
- (void)reconfigureVisibleCells
{
NSInteger sectionCount = [self numberOfSectionsInTableView:self.tableView];
for (NSInteger section = 0; section < sectionCount; ++section) {
NSInteger rowCount = [self tableView:self.tableView numberOfRowsInSection:section];
for (NSInteger row = 0; row < rowCount; ++row) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
@staltz
staltz / introrx.md
Last active April 19, 2025 05:15
The introduction to Reactive Programming you've been missing
@azamsharp
azamsharp / gist:6c1530b681e613b5711c
Created June 11, 2014 16:46
Easily Creating Blur Effect for UITableViewCells Using iOS 8 VisualEffectView
//
// FlowersTableViewController.swift
// Flowers++
//
// Created by Mohammad Azam on 6/6/14.
// Copyright (c) 2014 AzamSharp Consulting LLC. All rights reserved.
// www.azamsharp.com
// www.youtube.com/azamsharp
@matt-curtis
matt-curtis / NumberPadDoneBtn.h
Last active December 31, 2020 14:29
Done Button for UIKeyboard NumberPad (must be set as inputAccessoryView)
#import <UIKit/UIKit.h>
@interface NumberPadDoneBtn : UIView
@end
@interface NumberPadButton : UIButton
@end
@n8henrie
n8henrie / Remindersapp_Export.ics
Created May 26, 2014 18:15
.ics file exported from Reminders.app on OSX, with a few comments and examples of each of the fields.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Apple Inc.//Mac OS X 10.9.3//EN
CALSCALE:GREGORIAN
X-COMMENT: Copy your timezone data from an exported .ics file from Reminders.app.
BEGIN:VTIMEZONE
TZID:America/Denver
BEGIN:DAYLIGHT
TZOFFSETFROM:-0700
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active November 27, 2024 13:36
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 20, 2025 21:14
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@redent
redent / TCCustomFont.m
Created December 6, 2013 18:56
Categories for specifying custom fonts in Interface Builder and Storyboard. More info here: http://stackoverflow.com/a/15155081/469218
#import <UIKit/UIKit.h>
@interface UIButton (TCCustomFont)
@property (nonatomic, copy) NSString* fontName;
@end
@implementation UIButton (TCCustomFont)
- (NSString *)fontName {
return self.titleLabel.font.fontName;
@millermedeiros
millermedeiros / osx_setup.md
Last active March 23, 2025 01:23
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...