Skip to content

Instantly share code, notes, and snippets.

View seifscape's full-sized avatar
🎯
Focusing

Seif Kobrosly seifscape

🎯
Focusing
  • Apptitude Labs LLC
  • West Palm Beach, FL
  • 23:36 (UTC -04:00)
  • X @seifscape
View GitHub Profile
@mariozig
mariozig / migrate_repo.sh
Last active September 16, 2024 18:48
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@AliSoftware
AliSoftware / struct_vs_inheritance.swift
Last active March 5, 2025 06:57
Swift, Struct & Inheritance: How to balance the will of using Struct & Value Types and the need for Inheritance?
// #!Swift-1.1
import Foundation
// MARK: - (1) classes
// Solution 1:
// - Use classes instead of struct
// Issue: Violate the concept of moving model to the value layer
// http://realm.io/news/andy-matuschak-controlling-complexity/
#!/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 March 24, 2026 13:52
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 March 26, 2026 21:24
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 March 30, 2026 03:50
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k