In iTerm2, in the menu bar go to Scripts > Manage > New Python Script
Select Basic. Select Long-Running Daemon
Give the script a decent name (I chose auto_dark_mode.py
)
Save and open the script in your editor of choice.
-- ======================================================================== | |
-- | |
-- Subject: Comparing two spooled files | |
-- Author: Scott Forstie | |
-- Date : December, 2021 | |
-- | |
-- IBM i Services used : OUTPUT_QUEUE_ENTRIES_BASIC, SYSTOOLS.SPOOLED_FILE_DATA | |
-- SQL language features used: CTEs, Exception joins, Union, and row_number() | |
-- ======================================================================== |
-- | |
-- Subject: Audit Journal Management | |
-- Author: Scott Forstie | |
-- Date : March, 2023 | |
-- Features Used : This Gist uses qsys2.security_info, qsys2.journal_info, qsys2.object_statistics, qsys2.qcmdexc, CTEs, sysibmadm.env_sys_info, and SYSTOOLS.split | |
-- | |
-- Notes: | |
-- =============================================== | |
-- 1) There are many configuration options to consider using when establishing the Audit Journal, this Gist uses SQL to examine some of the most important choices. | |
-- 2) Its important to have a retention strategy for audit journal - journal receivers |
#!/usr/bin/env ruby -W1 | |
# frozen_string_literal: true | |
# Mac only | |
# | |
# Usage: grabicon.rb SEARCH TERMS [%[small|medium|large] [@[mac|ios|iphone|ipad]] | |
# If the search terms match a local app, that app's icon will be extracted and converted to PNG | |
# If the search terms don't match a local app, iTunes will be searched | |
# If the search terms end with "@mac", "@iphone", "@ipad", or "@ios", iTunes will be searched for a match | |
# If the search terms end with "%large", "%medium", "%small", or "%XXX" icon will be scaled to size |
function yahooF(ticker) { | |
const url = `https://query1.finance.yahoo.com/v8/finance/chart/${ticker}`; | |
const res = UrlFetchApp.fetch(url, {muteHttpExceptions: true}); | |
const contentText = res.getContentText(); | |
const data = JSON.parse(contentText); | |
// Check if the result exists and has data | |
if (data && data.chart && data.chart.result && data.chart.result.length > 0) { | |
const regularMarketPrice = data.chart.result[0].meta.regularMarketPrice; |
Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:
project-root/
├── cmd/
│ ├── your-app-name/
│ │ ├── main.go # Application entry point
│ │ └── ... # Other application-specific files
Develop an AI prompt that solves random 12-token instances of the A::B problem (defined here), with 90%+ success rate.
We'll use your prompt as the SYSTEM PROMPT, and a specific instance of problem as the PROMPT, inside XML tags. Example:
{ | |
"root": true, | |
"ignorePatterns": ["!**/*"], | |
"plugins": ["@nx", "ordered-imports", "prettier", "react-hooks"], | |
"overrides": [ | |
{ | |
"files": ["*.ts", "*.tsx"], | |
"extends": ["plugin:@nx/typescript", "plugin:react/recommended"], | |
"rules": { | |
"no-use-before-define": "warn", |
{ | |
"root": true, | |
"ignorePatterns": ["!**/*"], | |
"plugins": ["@nx", "ordered-imports", "prettier", "react-hooks"], | |
"overrides": [ | |
{ | |
"files": ["*.ts", "*.tsx"], | |
"extends": ["plugin:@nx/typescript", "plugin:react/recommended"], | |
"rules": { | |
"no-use-before-define": "warn", |