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
const MONTHLY_PAYMENT = 558; | |
const BORROW_APR = 0.2607; | |
const REWARD_APR = 0.446; | |
const TARGET_LTV = 0.3; | |
const ETH_STAKING_APR = 0.0483; | |
let collateral = 100000; | |
let debt = 30000; | |
let cost = 0; |
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 -e | |
# redelegate-cro.sh is a script that automatically claims all your delegation | |
# rewards (across any number of validators) in a single transaction (assuming a | |
# minimum reward threshold is met, to avoid spurious transactions). The rewards | |
# are then automatically redelegated to the provided validator address, leaving | |
# behind at least a 0.005 CRO buffer to ensure there is always enough for | |
# regular transaction fees. | |
# | |
# The idea is that it is safe to run this script on a fixed cron schedule and |
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 | |
#http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
set -euo pipefail | |
IFS=$'\n\t' | |
## Script to merge all mp4 videos in current directory (recursively 2 levels) | |
## And update chapter marks to retain the folder/filename | |
## Script for merging videos |
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 | |
# Let's "secure" even the script for you :) | |
sudo -v | |
function ok() { | |
echo -e "[OK] "$1 | |
} | |
function bot() { |
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
tell application id "DNtp" | |
set theRecords to the selection | |
if theRecords is {} then error "Please select some contents." | |
repeat with theRecord in theRecords | |
set customMD to custom meta data of theRecord | |
try | |
set theBibkey to mdbibkey of customMD |
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
on performSmartRule(theRecords) | |
tell application id "DNtp" | |
try | |
set these_items to the selection | |
if these_items is {} then error "Please select some contents." | |
repeat with this_item in these_items |
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
{ | |
"alfredtheme" : { | |
"result" : { | |
"textSpacing" : 5, | |
"subtext" : { | |
"size" : 10, | |
"colorSelected" : "#FEFFFEC4", | |
"font" : "System", | |
"color" : "#C6C6C665" | |
}, |
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 | |
{ set +x; } 2>/dev/null | |
IFS=$'\n' | |
set "$@" $(find ~ -name ".*" ! -name ".CFUserTextEncoding" ! -type l -mindepth 1 -maxdepth 1) # dotfiles | |
set "$@" $(find ~ -name "Google *" -mindepth 1 -maxdepth 1) # Google Drive | |
set "$@" ~/git # store on github/etc :) | |
set "$@" ~/node_modules | |
set "$@" ~/Applications # install apps with brew cask |
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
set ~/Applications/name.app | |
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f "$@" |
NewerOlder