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.
// Required to `view more`. Let this run for a while. | |
window.setInterval(() => { | |
var b = document.querySelector('.more-button'); | |
if (b) b.click(); | |
})(100); | |
// Now grab the details | |
var builds = document.querySelector('.builds >.build'); | |
var result = Array.from(document.querySelectorAll('.builds > .build')).map((b) => { |
// Post this in your console | |
[].filter.call(document.querySelector('.box-content').querySelectorAll('table'), (n) => { | |
if (n.innerText.indexOf('16GB') === -1 || n.innerText.indexOf('512GB') === -1) { | |
n.style.display = 'none'; | |
} | |
}) |
on alfred_script(q) | |
if application "iTerm2" is running or application "iTerm" is running then | |
run script " | |
on run {q} | |
tell application \":Applications:iTerm.app\" | |
activate | |
try | |
select first window | |
set onlywindow to true | |
on error |
const findTheMostNegativeComment = () => { | |
const voteVals = []; | |
const votes = document.querySelectorAll('.gig-comment-vote-total'); | |
[].forEach.call(votes, (v) => { | |
const val = v.innerHTML; | |
if (val.charAt(0) === '-') { | |
voteVals.push({ | |
text: val, | |
total: parseInt(val.slice(1)), | |
el: v |
It lives at https://github.com/8i/Chimera/blob/master/Recorder/V1/PointGrayRecorder/PointGrayRecorder.sln. Lol.
I've never got the post build steps to run. When I first got the recorder setup on my machine with Bob's help we simply deleted the code in here as it wasn't needed for the ServerApp
project. So you should just do this too. Only thing to remember here is to not commit this change.
I hereby claim:
To claim this, I am signing this object:
// Example usage | |
"This is my {string}".match(/{(.*)}/).pop(); // string | |
// Example function | |
function extractString(string, startChar, endChar) { | |
var re = new RegExp([startChar, '(.*)', endChar].join('')); | |
return string.match(re); | |
} |
# Simply restart the pboard daemon | |
launchctl stop com.apple.pboard | |
launchctl start com.apple.pboard | |
# Followed by restarting whichever app is being a dick |