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
{ | |
"always_run_in_app" : false, | |
"icon" : { | |
"color" : "yellow", | |
"glyph" : "fire" | |
}, | |
"name" : "WIP Streak", | |
"script" : "\/\/ Replace with your API key\nconst API_KEY = \"wip_sk_REPLACE_ME\";\nconst API_URL = `https:\/\/api.wip.co\/v1\/users\/me.json?api_key=${API_KEY}`;\n\n\/\/ Function to fetch data from the API\nasync function fetchStreakData() {\n let request = new Request(API_URL);\n let response = await request.loadJSON();\n return response;\n}\n\n\/\/ Function to calculate hours left until midnight in a given time zone\nfunction hoursLeftUntilMidnight(timeZone) {\n let now = new Date();\n let nowInUserTimeZone = new Date(now.toLocaleString(\"en-US\", { timeZone: timeZone }));\n let midnight = new Date(nowInUserTimeZone);\n midnight.setHours(24, 0, 0, 0); \/\/ Set to midnight\n\n let hoursLeft = (midnight - nowInUserTimeZone) \/ (1000 * 60 * 60); \/\/ Convert milliseconds to hours\n return hoursLeft.toFixed(0);\n}\n\n\/\/ Function to create a widget displaying the streak info\nasy |
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
/* | |
--PIETZ OBFUSCATE CODE-- | |
2019-06-01 | |
from MAKEbook.io | |
Instructions: | |
1) put this in your functions.php file | |
2) add this to the post you want to obfuscate, on top | |
3) [obfuscate] | |
4) to start obfuscating, add a HTML code or HTML block with <start></start> |
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/ruby | |
# Scipt for Using Reporter to start time entries in Toggl | |
require 'time' | |
require 'json' | |
# Prevent encoding errors on OSX | |
if RUBY_VERSION =~ /2.*.*/ | |
Encoding.default_external = Encoding::UTF_8 | |
Encoding.default_internal = Encoding::UTF_8 |
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
# install Homebrew | |
$ su ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# show brew commands | |
$ brew help | |
# check current user | |
$ echo $(whoami) | |
# grant access to the folders |
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
if RUBY_VERSION =~ /2.*.*/ | |
Encoding.default_external = Encoding::UTF_8 | |
Encoding.default_internal = Encoding::UTF_8 | |
end | |
dayone_path = '/path/to/journal.dayone/entries/' | |
file_path = ARGV[0] | |
/UUID:\s(?<uuid>.*)/ =~ IO.readlines(file_path)[1] | |
# Create working plist file |
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/local/bin/ruby | |
require 'plist' | |
# Fix encoding errors | |
if RUBY_VERSION =~ /2.2/ | |
Encoding.default_external = Encoding::UTF_8 | |
Encoding.default_internal = Encoding::UTF_8 | |
end |