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
javascript:(function()%7Bvar%20url%20%3D%20location.protocol%20%2B%20'%2F%2F'%20%2B%20location.host%20%2B%20location.pathname%3Bwindow.location.href%20%3D%20url%20%2B%20'%3F'%20%2B%20Math.floor((Math.random()%20*%20100000000000)%20%2B%201)%7D)() |
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
// Modify the items in the last row | |
// @param {Number} $range | |
// @param {String} $selector | |
@mixin u-last-row($range: 2, $selector: '.selector') { | |
&:nth-last-child(-n+#{$range}):nth-child(#{$range}n+1), | |
&:nth-last-child(-n+#{$range}):nth-child(#{$range}n+1) ~ #{$selector} { | |
@content; | |
} | |
} |
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 | |
# | |
# Update all local Craft CMS installations at once | |
# by adding the folder names and running: | |
# | |
# $ ./craft-updater.sh | |
# | |
ROOT_PATH="/path/to/local/htdocs/" |
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
# resize width only | |
convert input.jpg -resize 400 output.jpg | |
# resize height only | |
convert input.jpg -resize x400 output.jpg | |
# crop from center | |
convert input.jpg -gravity center -crop 200x200+0+0 +repage output.jpg | |
# convert all images to new name |
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
## | |
## | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
127.0.0.1 localhost | |
255.255.255.255 broadcasthost | |
::1 localhost |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app |
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
# Show system info on startup | |
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName | |
# Change screen shots file type | |
defaults write com.apple.screencapture type jpg && killall SystemUIServer | |
# Change screen shot default file name | |
defaults write com.apple.screencapture name "Screen shot" && killall SystemUIServer | |
# Change screen shots location |
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
php -d allow_url_fopen=On ../../composer.phar install |
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
# /etc/nginx/craftcms/general.conf | |
location ~ "^/(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp|webmanifest)$" { | |
try_files $uri /$1.$3$is_args$args; | |
} |
OlderNewer