Skip to content

Instantly share code, notes, and snippets.

// IPSUM image generator [http://ipsumimage.appspot.com]
$ipsum-img-api: 'http://ipsumimage.appspot.com' !default;
@mixin ipsum-img($width, $height, $label: false) {
@if $label {
background-image: url($ipsum-img-api + '/' + $width + 'x' + $height + '?l=' + $label);
} @else {
background-image: url($ipsum-img-api + '/' + $width + 'x' + $height);
}
background-position: center center;
@Vitre
Vitre / SSH-KEYGEN linux
Last active August 29, 2015 14:19
SSH-KEYGEN linux
ssh-keygen -t rsa -C "your_email@example.com"
sudo apt-get install xclip
xclip -sel clip < ~/.ssh/id_rsa.pub
clip < ~/.ssh/id_rsa.pub
@Vitre
Vitre / axure-web-fonts
Last active September 1, 2015 18:31
FontAwesome CDN
https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css
https://fonts.googleapis.com/icon?family=Material+Icons
@Vitre
Vitre / httpd chmod
Last active November 22, 2015 17:23
Apache source permission fix
sudo find . -type f -exec chmod 644 {} \; && sudo find . -type d -exec chmod 755 {} \;
sudo chmod -R 777 ./
chmod g=,o=rx /home/*
# chmod revert
git diff --numstat | awk '{if ($1 == "0" && $2 == "0") print $3}' | xargs git checkout HEAD
git diff --summary | grep --color 'mode change 100755 => 100644' | cut -d' ' -f7- | xargs -d'\n' chmod +x
git diff --summary | grep --color 'mode change 100644 => 100755' | cut -d' ' -f7- | xargs -d'\n' chmod -x
@Vitre
Vitre / Ubuntu-Helpers.sh
Last active December 12, 2015 15:42
Ubuntu helpers
# Root clear
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
# Unity Lens DISABLE
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"
# Spotify FIX
@Vitre
Vitre / mattermost-upgrade.sh
Created October 27, 2017 08:51
Mattermost upgrade
ln -s /home/mattermost/config/ /home/mattermost/mattermost/ && ln -s /home/mattermost/data/ /home/mattermost/mattermost/ && ln -s /ho me/mattermost/logs/ /home/mattermost/mattermost/
sudo chown -R mattermost:mattermost ./mattermost
@Vitre
Vitre / ruby-cygwin.sh
Last active November 7, 2017 13:31
ruby-cygwin.sh
# ruby
alias ruby='/cygdrive/c/Host/opt/Ruby/2.4/bin/ruby.exe'
alias gem='/cygdrive/c/Host/opt/Ruby/2.4/bin/gem.cmd'
alias bundle='/cygdrive/c/Host/opt/Ruby/2.4/bin/bundle.bat'
alias rails='/cygdrive/c/Host/opt/Ruby/2.4/bin/rails.bat'
# sys
alias la='ls -la'
@Vitre
Vitre / windows-build-tools.sh
Last active November 7, 2017 14:37
windows-build-tools.sh
npm install --global --production windows-build-tools
@Vitre
Vitre / bcrypt-ruby-fix.sh
Last active November 21, 2017 14:53
bcrypt-ruby fix
bundle install && gem uninstall bcrypt-ruby --force && gem uninstall bcrypt --force && gem install bcrypt --platform=ruby
<template>
</template>
<script>
export default {
data () {
return {}
}
}