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
### Keybase proof | |
I hereby claim: | |
* I am whobutsb on github. | |
* I am stevebarbera (https://keybase.io/stevebarbera) on keybase. | |
* I have a public key whose fingerprint is 7F73 AC83 F5D1 BBE1 DFB8 8388 608F 6408 ADD7 2D74 | |
To claim this, I am signing this object: |
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
function Github() { | |
if [ ! -d .git ] ; | |
then echo "ERROR: This isn't a git directory" && return false; | |
fi | |
git_url=`git config --get remote.origin.url` | |
if [[ $git_url != [email protected]:* ]] ; | |
then echo "ERROR: Remote origin is invalid" && return false; | |
fi | |
url=${git_url%.git} | |
if [[ $url == [email protected]:* ]] ; |
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 Ffmpeg = require(‘fluent-ffmpeg’); | |
const STREAM_URL = ‘http://icecast.radio24.ch/radio24-rc-96-aac'; | |
const VOLUME_THRESHOLD = -50; // volume threshold | |
getMeanVolume(STREAM_URL, function(meanVolume){ | |
if(meanVolume <= VOLUME_THRESHOLD){ | |
console.log(“WE HAVE A PROBLEM! VOLUME IS TOO LOW!”); | |
}else{ | |
console.log(‘ALL GOOD!’); | |
} |
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 alfred_script(q) | |
tell application "Google Chrome" | |
set allWins to every window | |
set allTabs to {} | |
repeat with currWin in allWins | |
set allTabs to allTabs & every tab of currWin | |
end repeat | |
repeat with currTab in allTabs | |
try | |
if (URL of currTab) starts with "https://soundcloud.com" or "http://soundcloud.com" then set musicTab to currTab |
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
chrome = Application("Google Chrome"); | |
windows = chrome.windows; | |
for(i = 0; i < windows.length; i++){ | |
tabs = windows[i].tabs; | |
for(j = 0; j < tabs.length; j++){ | |
url = tabs[j].url(); | |
if(url.match(/soundcloud.com/)){ | |
tabs[j].execute({ javascript: "document.querySelector('.playControl').click();" }); |
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
chrome = Application("Google Chrome"); | |
windows = chrome.windows; | |
for(i = 0; i < windows.length; i++){ | |
tabs = windows[i].tabs; | |
for(j = 0; j < tabs.length; j++){ | |
url = tabs[j].url(); | |
if(url.match(/youtube.com/)){ | |
tabs[j].execute({ javascript: "document.querySelector('.ytp-play-button').click();" }); |
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
// grab the chrome object | |
var chrome = Application('Google Chrome'); | |
// create a new chrome window | |
var window = chrome.Window().make(); | |
// set the links you want to open | |
var links = [ | |
"https://gmail.com", | |
"https://soundcloud.com", |
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
// grab the chrome object | |
var chrome = Application("Google Chrome"); | |
// grab all of the chrome windows | |
var windows = chrome.windows; | |
// loop through the chrome windows | |
for(i = 0; i < windows.length; i++){ | |
// grab all of the tabs for the window |
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
var chrome = Application("Google Chrome"); | |
var windows = chrome.windows; | |
for(i = 0; i < windows.length; i++){ | |
var tabs = windows[i].tabs; | |
for(j = 0; j < tabs.length; j++){ | |
var url = tabs[j].url(); | |
if(url.match(/youtube.com/)){ | |
tabs[j].execute({ javascript: "document.querySelector('.ytp-play-button').click();" }); |
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
chrome = Application("Google Chrome"); | |
windows = chrome.windows; | |
for(i = 0; i < windows.length; i++){ | |
tabs = windows[i].tabs; | |
for(j = 0; j < tabs.length; j++){ | |
url = tabs[j].url(); | |
if(url.match(/soundcloud.com/)){ | |
tabs[j].execute({ javascript: "document.querySelector('.playControl').click();" }); |
OlderNewer