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)"
# 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"
from os import listdir
from os.path import isfile, join
import time
import os.path
mypath = "/Volumes/VOLUME1/DCIM/100MEDIA/"
onlyfiles = [join(mypath, f) for f in listdir(mypath)]
onlyfiles = [f for f in onlyfiles if isfile(f)]
@NicholasTD07
NicholasTD07 / clean_up_and_create_sims.rb
Last active October 11, 2018 23:38
This script can be used to delete all your iOS simulators and recreate the ones you want.
require 'pp'
require 'fastlane'
require 'snapshot/reset_simulators'
# Run the script where you have fastlane installed with `bundle exec ruby clean_up_and_create_sims.rb`
def delete_all_iOS_sims
FastlaneCore::Simulator.delete_all
end
@NicholasTD07
NicholasTD07 / goget-which-plan-to-get.py
Last active July 11, 2018 01:01
Which GoGet plan should I pick?
WEEKS = 52
MONTHS = 12
# per year
def starter(hours_per_week, days_per_month):
base = 49
hourly = 10.65
daily = 87
@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

// Swift 3
protocol ActionType { }
struct InitialAction: ActionType { }
class Store<State> {
var state: State!
typealias Reducer = (State?, ActionType) -> State
final let reducer: Reducer
protocol ActionType { }
struct InitialAction: ActionType { }
class Store<State> {
var state: State!
typealias Reducer = (State?, ActionType) -> State
final let reducer: Reducer
init(with reducer: @escaping Reducer) {
@NicholasTD07
NicholasTD07 / no-bouncing-dock-icons-macOS.sh
Created August 2, 2016 02:18
Dock icons, STOP BOUNCING ALL DAY!
#!/bin/sh
main() {
no_bouncing_dock_icons
}
no_bouncing_dock_icons() {
defaults write com.apple.dock no-bouncing -bool TRUE
killall Dock
}