sudo rsync -aAXvP --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"," /etc/sysconfig/network-scripts/*","/etc/network/interfaces"} username@hostname:/* /
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
'use strict'; | |
import path from 'path'; | |
import awspublish from 'gulp-awspublish'; | |
import parallelize from 'concurrent-transform'; | |
import keys from 'config/keys.js' | |
export default function(gulp, plugins, args, config) { | |
let dirs = config.directories; | |
let build = dirs.destination; |
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
window.Gallery ||= {} | |
((app) -> | |
$(document).ready -> | |
$pswpElement = $('.pswp')[0] | |
$pswpCollection = $('@pswp-collection') | |
$pswpCollection.each -> | |
collection = $(@) | |
$pswpLinks = collection.find('[role*="pswp-link"]') | |
$pswpLinks.on 'click', (e) -> |
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
def show | |
@post = Post.friendly.find(params[:id]) | |
if request.path != post_path(@post) | |
expires_in 8.hours, :public => true | |
return redirect_to @post, :status => :moved_permanently | |
end | |
end |
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
$transition-bounce: cubic-bezier(0.405, 1.510, 1.000, 0.915) | |
.messages-list | |
+translate3d(0,0,0) | |
.message-box-user-avatar | |
display: inline-block | |
position: relative | |
padding-right: 10px | |
&, &:focus, &:hover |
Sometimes you need to switch homebrew package versions.
For example, due to this issue with imagemagick:
This installation of RMagick was configured with ImageMagick 6.8.9 but ImageMagick 6.9.0-9 is in use.
Clone homebrew repo and find commit with necessary version in git log (mine was 1e30cbf
for imagemagick 6.8.9-1)
git clone [email protected]:Homebrew/homebrew.git
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
nmap <leader>h :%!html2haml --erb 2> /dev/null<CR>:set ft=haml<CR> | |
vmap <leader>h :!html2haml --erb 2> /dev/null<CR> |
Use https://github.com/creationix/nvm or https://github.com/tj/n
Install node version
nvm install 0.10.32
nvm use 0.10.32
Set as default
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
gem "middleman" | |
gem "slim-rails", require: false | |
gem 'htmlentities' |
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
// views/shared/_outdated_browser.html.haml | |
.center-block-container | |
.center-block-content | |
#jr_inner{style: "max-width: 500px;"} | |
// ... | |
.container | |
.row | |
.col-md-6.col-md-offset-3.col-sm-8.col-sm-offset-2 |