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
// check if el is in view | |
function is_el_in_view(el, full_el_visible) { | |
if (!el) return false; | |
// should we return true if the element is only partially visible (default) | |
full_el_visible = typeof full_el_visible != "undefined" ? full_el_visible : false; | |
var el_pos = get_absolute_offset(el), | |
el_h = el.offsetHeight, | |
window_h = window.innerHeight || document.documentElement.clientHeight, |
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
#!/bin/bash | |
HOST="" | |
USER="" | |
PASS="" | |
LCD="./" | |
RCD="/path/to/remote/" | |
lftp -e "mirror --reverse \ | |
--delete \ | |
--verbose \ |
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
#!/bin/sh | |
# server settings | |
SERVER="user@server.com" | |
SERVER_PATH="/var/www/project" | |
SSH_PORT="2222" | |
# sync with some standard exclude paths | |
rsync -rav -e "ssh -p $SSH_PORT" \ | |
--exclude='*.git' \ |
NewerOlder