This file contains hidden or 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
#!/bin/zsh | |
#usage: wt [title name] | |
#deselect all the options for window and tab titles in the iterm->preferences->appearance section. And in the .zshrc uncomment/add export DISABLE_AUTO_TITLE="true" | |
#via http://superuser.com/questions/292652/change-iterm2-window-and-tab-titles-in-zsh | |
echo -ne "\e]1;$1\a" |
This file contains hidden or 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 node | |
var cheerio = require('cheerio') | |
var recursive = require('recursive-readdir'); | |
var fs = require('fs'); | |
recursive('.', function (err, files) { | |
// Files is an array of filename | |
for(f = 0; f < files.length; f++) |
This file contains hidden or 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
$('a.sharebutton.twitter').click(function(e){ | |
window.open("https://twitter.com/intent/tweet?text=" + encodeURIComponent($('meta[name="twitter:description"]').attr('content').substring(0, 116)) + "&url=" + encodeURIComponent(window.location.href),"tweet", "width=500,height=300"); | |
}); |
This file contains hidden or 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
//Now with less jquery | |
//1) go to your my-list page, and scroll to the bottom to make sure it's all loaded: | |
//http://www.netflix.com/browse/my-list | |
//2) Next, paste this in your developer tools console and hit enter: | |
[...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label')) | |
//or use this to copy the list to your clipboard: | |
copy([...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label'))) |
This file contains hidden or 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
#!/bin/bash | |
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin) | |
CATALINA_HOME=/Library/Tomcat | |
function shutdown() { | |
date | |
echo "Shutting down Tomcat" | |
$CATALINA_HOME/bin/catalina.sh stop |
NewerOlder