Skip to content

Instantly share code, notes, and snippets.

@Darep
Darep / Rakefile
Last active January 27, 2018 22:39
Super simple Middleman deploy script, uses Rsync over SSH or plain SCP
SSH_USER = 'test'
SSH_HOST = 'example.com'
SSH_DIR = '/home/test/website/releases'
RSYNC = false
desc "Run the preview server at http://localhost:4567"
task :preview do
system("middleman server")
end
#!/bin/sh
#
# Diffs the bundles of a branch with master.
#
BRANCH=$1
# Don't build master if we already have it
if [ ! -d "build_master" ]; then
echo 'Building "master" branch bundle...'
@Darep
Darep / no-comments.js
Created May 30, 2016 07:01
Remove all comments from GitHub Pull Request
// Sometimes it's necessary to do a bit of clean-up
Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) {
el.removeAttribute('data-confirm');
el.click();
});
@Darep
Darep / .htaccess
Last active April 23, 2024 07:16
PHP CSS&JS auto-versioning function.
# CSS/JS auto-versioning
RewriteEngine On
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]