This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import CoreData | |
public final class FetchedResultsPublisher | |
<ResultType> | |
: Publisher | |
where | |
ResultType: NSFetchRequestResult | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# An set of disks to ignore from partitioning and formatting | |
BLACKLIST="/dev/sda|/dev/sdb" | |
# Base directory to hold the data* files | |
DATA_BASE="/media" | |
usage() { | |
echo "Usage: $(basename $0) <new disk>" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
source /home/your/path/to/chia-blockchain/activate | |
STR=$(chia farm summary | head -8) | |
FARM=$(chia farm summary | head -8 | sed 's/ /_/g; s/:_/=/g') #jq -Rs '{chia:split("\n")|map(split(": ")|{(.[0]):.[1]}?)}' | |
ACTIVE=$(pgrep -fa 'chia plots create' | wc -l) | |
printem() { | |
echo "Active_Plots=$ACTIVE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
b=$(system_profiler SPPowerDataType) | |
amp=$(echo "$b" | grep 'Amperage (mA):' | cut -d ':' -f 2 | xargs) | |
volt=$(echo "$b" | grep 'Voltage (mV):' | cut -d ':' -f 2 | xargs) | |
power=$(($amp * $volt / 1000)) | |
echo "$b" | grep --color=never -A 1 'Battery Information:' | |
echo "$b" | grep --color=never -A 1 'Amperage (mA)' | |
echo " Total Power (mW): $power" | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo launchctl stop com.apple.audio.coreaudiod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb | |
require 'fastlane_core/device_manager' | |
FastlaneCore::Simulator.delete_all_by_version(os_version: "12.4") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
# TODO: get rid of ios/ in paths | |
jobs: | |
build-and-test: | |
macos: | |
xcode: "11.0" | |
steps: | |
- attach_workspace: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LANG=en_US.UTF-8 | |
export LANGUAGE=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
ENVS=~/env | |
PATH_SCRIPTS="/Users/igorpopov/Library/Mobile Documents/com~apple~CloudDocs/Scripts/" | |
# path | |
export PATH=~/scripts/:$PATH:~/work/scripts/:$ENVS:$PATH_SCRIPTS | |
# parse envs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# | |
sudo gem install fastlane -NV | |
# | |
sudo gem install cocoapods | |
# | |
gem install xcode-install | |
# |
NewerOlder