Skip to content

Instantly share code, notes, and snippets.

View vladimirtsyupko's full-sized avatar

Vladimir Tsyupko vladimirtsyupko

View GitHub Profile
@vladimirtsyupko
vladimirtsyupko / gist:10964740
Created April 17, 2014 08:31
Scrapy + cron
touch script
chmod 777 script
nano script
Put this to script “
#!/bin/bash
export PATH="/usr/local/bin:/usr/bin:/bin"
cd `dirname $0`
exec "$@"
env EDITOR=nano crontab -e
@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@vladimirtsyupko
vladimirtsyupko / gist:10964795
Created April 17, 2014 08:32
Git ignore doesn’t work
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@vladimirtsyupko
vladimirtsyupko / protocolcheck.js
Created March 17, 2016 12:42
protocolcheck.js with successCallback
(function (window) {
function _registerEvent(target, eventType, cb) {
if (target.addEventListener) {
target.addEventListener(eventType, cb);
return {
remove: function () {
target.removeEventListener(eventType, cb);
}
};