This file contains hidden or 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
/* | |
* Just a JS function to check if the viewport matches the guessed bootstrap grid option. | |
* It uses the modern matchMedia object passing the same media query that bootstrap use, in both v3 or 4. | |
* Otherwise falls back using the standard window object. | |
* I often saw using the screen object for the same purpose, | |
* but it behaves strangely in extended desktop layouts with multiple monitors. | |
* Note that window.innerWidth instead, should not be used from within frames. | |
*/ | |
function isViewport(bsSelector) |
This file contains hidden or 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 | |
# it will substitute all source files and needs to work with absolute paths | |
#for f in *.jpg; # loop folder | |
for f in $(find "/absolute/path/" -name '*.jpg'); do # loop folder recursively | |
# crop images to squared ones according to the shorter side of the source | |
do convert $f -gravity center -crop `identify -format "%[fx:min(w,h)]x%[fx:min(w,h)]+0+0" $f` +repage $f; | |
# resize the canvas of the source images to squared ones according to the larger side of the source and fill the gaps with a bg color | |
do convert $f -resize "600x600" -gravity center -background "#f6f6f6" -extent 600x600 $f; | |
# resize the image to a with of 1080 preserving the aspect ratio |
This file contains hidden or 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
for %%a in ("*.ogg") do ffmpeg -i "%%a" -acodec libmp3lame "mp3\%%~na.mp3" | |
pause |
This file contains hidden or 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 | |
# http://wiki.compiz.org/C%2B%2BCompiling | |
# This is basically a script version of the official documentation above | |
# with a few fix needed to successfully compile on debian jessie | |
wget https://launchpad.net/compiz/0.9.10/0.9.10.0/+download/compiz-0.9.10.0.tar.bz2 | |
tar -xf compiz-0.9.10.0.tar.bz2 | |
rm compiz-0.9.10.0.tar.bz2 | |
cd compiz-0.9.10.0/ |
This file contains hidden or 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 | |
# jessie/testing | |
packages=( | |
# base desktop | |
xorg | |
xfce4 | |
# openbox | |
slim |
NewerOlder