Skip to content

Instantly share code, notes, and snippets.

View NicholasTD07's full-sized avatar

Nicholas T. NicholasTD07

View GitHub Profile
@NicholasTD07
NicholasTD07 / README.md
Created December 3, 2023 09:00
Taking the install script for a test drive
zsh -c "$(curl -fsSL https://raw.githubusercontent.com/NicholasTD07/dotfiles/install-script/install.zsh)"
@NicholasTD07
NicholasTD07 / how-to-download-iOS-simulator-in-command-line-and-install-it.md
Last active November 10, 2023 19:39
How to Download iOS Simulator (Xcode) in Command Line and Install it

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  4. You will get a message like this:
# coding: utf-8
from pytube import (
Playlist as P,
Stream as S,
YouTube as Y
)
from pytube.cli import on_progress
async def download_best_quality_streams(youtube: Y):
cask "kensingtonworks" do
version "3.1.6_1689898605"
sha256 "6ce8715647defb7a9adb9e3cb3e6651f745302083dcb8c6beccf6b138477d973"
url "https://www.kensington.com/siteassets/software-support/kensingtonworks/july-2023/kensingtonworks_#{version}.pkg"
name "KensingtonWorks"
desc "Software for customizing Kensington devices"
homepage "https://www.kensington.com/software/kensingtonworks/"
pkg "kensingtonworks_#{version}.pkg"
" For Vundle, uncomment next line
" Plugin 'Lokaltog/vim-easymotion'
" easymotion
let g:EasyMotion_smartcase = 1 " turn on case insensitive feature
let g:EasyMotion_do_mapping = 0 " disable default mappings
let g:EasyMotion_use_smartsign_us = 1 " 1 will match 1 and !
let g:EasyMotion_use_upper = 1
let g:EasyMotion_keys = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ;'
@NicholasTD07
NicholasTD07 / TimeTracking.swift
Last active March 5, 2021 01:26
I use this to know how many hours I work a day.
#!/usr/bin/env xcrun swift
// Usage: path/to/TimeTracking.swift
// Go to bottom to see how it's used.
// The MIT License (MIT)
// Copyright (c) 2015 Nicholas T.
// Permission is hereby granted, free of charge, to any person obtaining a copy
# Using this script downloads ALL the videos in NSScreencast.
# Use it wisely, it's extra load/bandwidth for the NSScreencast website.
# Usage: `EMAIL=your email PASSWORD=your password END=how many videos should be downloaded? ruby download-nsscreencast.rb`
require "mechanize"
require "parallel"
mechanize = Mechanize.new
mechanize.post("https://www.nsscreencast.com/user_sessions", {"email" => ENV["EMAIL"], "password" => ENV["PASSWORD"]})
mechanize.pluggable_parser.default = Mechanize::Download
@NicholasTD07
NicholasTD07 / clean-up-simulators.sh
Created July 15, 2015 04:26
Remove all unavailable iOS simulators
#!/bin/sh
# "Delete all unavailable devices."
xcrun simctl delete unavailable
@NicholasTD07
NicholasTD07 / clean-up-ghost-devices.sh
Created July 15, 2015 07:28
Clean up ghost iOS simulators in `xcrun simctl`
#!/bin/sh
# I was having ghost devices in my iOS Simulator.
# There were multiple device for one device type, one OS.
# For example, there were at least 4-5 devices for iPhone 6, OS 8.4
# USE IT AT YOUR OWN RISK
devices=(`xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1`)
for device in $devices; do
@NicholasTD07
NicholasTD07 / codecov-with-spm.md
Created May 10, 2017 23:29
Generate code coverage report with Swift Package Manager

Set up

gem install xcov # required | might need sudo
gem install fastlane # optional | might also need sudo

Generate code coverage report