Skip to content

Instantly share code, notes, and snippets.

View navartis's full-sized avatar

Dmitriy Kulakov navartis

View GitHub Profile
on idle
# Change these to your VPN's IP Address, and the VPN's name in your Mac's Network System Prefernces panel.
set vpnIPAddress to "111.222.333.444"
set vpnServiceName to "AlgoVPN"
set myIP to "127.0.0.1"
set shellScriptCommands to {¬
"dig +short myip.opendns.com @resolver1.opendns.com", ¬
"dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'\"' '{ print $2}'", ¬
"curl ifconfig.me", ¬
@0xjac
0xjac / private_fork.md
Last active May 13, 2025 13:48
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@gonzalezreal
gonzalezreal / ios-cell-registration-swift.md
Last active March 5, 2025 02:07
iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.

Both UITableView and UICollectionView offer a similar API to register custom cell classes:

public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
@floatplane
floatplane / .lldbinit
Created May 7, 2015 17:05
Sample .lldbinit
# This file contains commands that LLDB will execute at startup. Drop it in your
# home directory: ~/.lldbinit
# Dump the UIKit view hierarchy
command regex rd 's/[[:space:]]*$/po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]/' 's/.+$/po [%1 recursiveDescription]/'
# Try not to step into uninteresting library code. Needs some work.
settings set target.process.thread.step-avoid-regexp ^(std::(!function)|boost::shared_ptr)
# https://github.com/facebook/chisel