start new:
tmux
start new with session name:
tmux new -s myname
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 30; |
#!/usr/bin/sh | |
rm -rf "$HOME/Library/Preferences/WebIde70" | |
rm -rf "$HOME/Library/Caches/WebIde70" | |
rm -rf "$HOME/Library/Application Support/WebIde70" | |
rm -rf "$HOME/Library/Logs/WebIde70" |
What do you think the following code does?
function fn(msg, time) {
setTimeout(function() {
console.log(msg);
}, time);
}
fn('it works', 1000);
// | |
// The code in this file should: | |
// - build a thumbnail container | |
// - populate the container with thumbnails | |
// - when a thumbnail is clicked, the main image should be updated with the appropriate image | |
// | |
// This code should be optional, and initiate itself if included. | |
// | |
(function(){ | |
var thumbContainer = document.createDocumentFragment(); |
/* | |
Form Elements | |
-- Styled to look like native Safari on OS X. | |
-- Drop-down <select> menus are unaffected. | |
-- Buttons are unaffected. Native OS style. | |
*/ | |
input, | |
button, | |
select, |