Skip to content

Instantly share code, notes, and snippets.

View seifscape's full-sized avatar
:octocat:

Seif Kobrosly seifscape

:octocat:
  • Apptitude Labs LLC
  • West Palm Beach, FL
  • 06:30 (UTC -05:00)
  • X @seifscape
View GitHub Profile
@oleander
oleander / Makefile
Created April 6, 2017 12:26
How to use the Swift Package Manager and CocoaPods within the same XCode application
APP="MyApp"
CONSTRUCT=xcodebuild -workspace $(APP).xcworkspace -scheme $(APP) clean
install_deps:
pod install
create_config:
swift package fetch
swift package generate-xcodeproj
wipe:
rm -rf .build $(APP).xcodeproj $(APP).xcworkspace Package.pins Pods Podfile.lock
@ilyapuchka
ilyapuchka / StickyLayout.swift
Last active February 25, 2024 18:43
Really sticky collection view layout
// The issue with sectionHeadersPinToVisibleBounds and sectionFootersPinToVisibleBounds is that they do not pin
// first header and last footer when bouncing. This layout subclass fixes that.
class StickyLayout: UICollectionViewFlowLayout {
override init() {
super.init()
self.sectionFootersPinToVisibleBounds = true
self.sectionHeadersPinToVisibleBounds = true
}
@gyubokbaik
gyubokbaik / panGestureRecognizerHandler.txt
Created March 29, 2017 00:02
Blog - Dismiss ViewControllers Presented Modally Using Swipe Down
// define a variable to store initial touch position
var initialTouchPoint: CGPoint = CGPoint(x: 0,y: 0)
@IBAction func panGestureRecognizerHandler(_ sender: UIPanGestureRecognizer) {
let touchPoint = sender.location(in: self.view?.window)
if sender.state == UIGestureRecognizerState.began {
initialTouchPoint = touchPoint
} else if sender.state == UIGestureRecognizerState.changed {
if touchPoint.y - initialTouchPoint.y > 0 {
I found the need to route specific machines and ports around the VPN. Since I run the VPN client in my router, all my traffic by default goes through the VPN. but if you have FTP, trackers that dont allow VPN/Proxy, RDP, SSH or other ports that you would like to go through your ISP's IP address there is a way to do this!
I found the answer on a another VPN forum. I can post the link but I am unsure if that will be breaking TorGuards rules.
In a nutshell... what this script does is it makes all of your IP address bypass the VPN, and then it adds rules using
ip_addrs_lst="192.168.1.1-192.168.1.50"
@jwalanta
jwalanta / OpenWrt detect new device and send text message.md
Last active December 25, 2025 05:52
Detect new network devices connecting to OpenWrt and send text message
@giannisp
giannisp / gist:848636b35837c0e98324ef5ac5f2aa15
Last active November 20, 2021 08:22
Fix ssh key issues on macOS Sierra 10.12.x
# store passphrase on keychain
ssh-add -K
# and/or add to ~/.ssh/config:
Host *
UseKeychain yes
@chranderson
chranderson / nvmCommands.js
Last active December 20, 2025 10:24
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@thesyntaxinator
thesyntaxinator / Safari save all tabs
Last active January 16, 2025 06:03
Safari save all tabs (tested on Mac OS Sierra 10.12.1 with Safari 10.0.1)
-- Based on code from:
-- https://gist.github.com/agoddard/5114024
-- https://gist.github.com/edenwaith/2213a764ccb091d6a03989f238efb63f
-- https://computers.tutsplus.com/tutorials/generate-a-list-of-open-safari-tabs-with-applescript--mac-30564
-- Instructions
-- 1. Open Automator -> create new Service.
-- 2. Select "no input" and "Safari"
-- 3. Drag "Run AppleScript" to the pane on the right.
-- 4. Paste the below code where it says "(* Your script goes here *)".
@marmelroy
marmelroy / objectiveKit.swift
Last active May 24, 2019 15:11
ObjectiveKit.swift
let mapViewClass = ObjectiveClass<MKMapView>()
let selectors = mapViewClass.selectors // An array of selectors.
let properties = mapViewClass.properties // An array of properties.
mapViewClass.addSelector(#selector(testSelector), from: self.classForCoder)
@chuckreynolds
chuckreynolds / .zshrc
Last active January 7, 2024 20:05
ZSH w/ Oh-My-ZSH config file with bash alias
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm