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 python3 | |
import subprocess, random, glob | |
print('HERE WE GO') | |
sounds = glob.glob('/Users/{yourName}/Library/Sounds/*.aiff') | |
sound = random.choice(sounds) | |
print('randomly selected sound: ', sound) | |
command = 'defaults write .GlobalPreferences com.apple.sound.beep.sound /Users/{yourName}/Library/Sounds/{}.aiff'.format(sound) | |
# You could also define an array of sounds yourself, if you don't want every |
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
* * * * * command to execute | |
│ │ │ │ │ | |
│ │ │ │ └─── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0) | |
│ │ │ └──────── month (1 - 12) | |
│ │ └───────────── day of month (1 - 31) | |
│ └────────────────── hour (0 - 23) | |
└─────────────────────── min (0 - 59) | |
// Taken from Ole Michelsen | |
// https://ole.michelsen.dk/blog/schedule-jobs-with-crontab-on-mac-osx.html |
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
// ai.js | |
module.exports = function unleashAdvancedAI(pathToTextInput) { | |
let fs = require("fs") | |
return new Promise(function(resolve, reject) { | |
try { | |
let content = fs.readFileSync(pathToTextInput, 'utf8') |
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
let rp = require('request-promise'); | |
rp('https://www.youtube.com/watch?v=dQw4w9WgXcQ') // lol | |
.then(function (htmlString) { | |
// It worked! Process htmlString... | |
}) | |
.catch(function (err) { | |
// It failed! Handle the error... | |
}); |
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
{"lastUpload":"2021-03-16T02:04:08.623Z","extensionVersion":"v3.4.3"} |
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
* * * * * command to execute | |
│ │ │ │ │ | |
│ │ │ │ └─── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0) | |
│ │ │ └──────── month (1 - 12) | |
│ │ └───────────── day of month (1 - 31) | |
│ └────────────────── hour (0 - 23) | |
└─────────────────────── min (0 - 59) | |
// Took this from Ole Michelsen | |
// https://ole.michelsen.dk/blog/schedule-jobs-with-crontab-on-mac-osx.html |
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
let aPromise = new Promise(function(resolve, reject) {}); | |
console.log(typeof aPromise) // object | |
console.log(aPromise.constructor.name) // Promise | |
console.log(aPromise) // Promise { <pending> } |
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
console.log("🏃 appStoreConnectAPIFromNode.js running 🏃") | |
const fs = require('fs'); | |
const jwt = require('jsonwebtoken'); // npm i jsonwebtoken | |
// You get privateKey, apiKeyId and issuerId from your Apple App Store Connect account | |
const privateKey = fs.readFileSync("./AuthKey_123456789Z.p8") // this is the file you can only download once and should treat like a real, very precious key. | |
const apiKeyId = "123456789Z" | |
const issuerId = "12345678-CLAP-FORR-THIS-GIBBERISHLOLz" | |
let now = Math.round((new Date()).getTime() / 1000); // Notice the /1000 | |
let nowPlus20 = now + 1199 // 1200 === 20 minutes |