Skip to content

Instantly share code, notes, and snippets.

💭
Making magic happen at @3magine

Karl Schellenberg schellenbergk

💭
Making magic happen at @3magine
Block or report user

Report or block schellenbergk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View __mixins.scss
//mixins:
@import "~poly-fluid-sizing/poly-fluid-sizing";
// eg. @include poly-fluid-sizing('height', ($mobileL:666px, $tablet:613px));
// eg. @include grid-spacing($spc:20px,$vertical:$laptop);
@mixin grid-spacing($spc: 10px, $vertical: $tablet) {
$spc-half: ($spc/2);
margin-left: -$spc-half;
View toWebP.sh
#!/bin/bash
# usage examples:
# toWebP.sh "*.png" # convert all png's in current directory
# toWebP.sh "icon-*.jpg" # convert all jpg's that start with "icon-"
if [ $# -eq 0 -o -z "$1" ]; then
echo "No file pattern supplied";
exit 1;
fi
@schellenbergk
schellenbergk / .editorconfig
Last active Feb 23, 2019
My Editor Configuration
View .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
View grayscale.css
img.grayscale {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
}
@schellenbergk
schellenbergk / mysql_to_csv.sh
Created Oct 24, 2017
Export mysql data into csv
View mysql_to_csv.sh
#!/bin/bash
mysql -u db_user -p db_db -e "select firstname, lastname, email from users" -B | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > list.csv
@schellenbergk
schellenbergk / cron_monitor_mysql
Last active Oct 19, 2017 — forked from mheadd/monitor.sh
Simple bash script to check whether MySQL is running.
View cron_monitor_mysql
#!/bin/bash
# crontab -e
# add:
# */5 * * * * /root/bin/cron_monitor_mysql > /dev/null 2>&1
UP=$(pgrep mysql | wc -l);
if [ "$UP" -ne 1 ];
then
echo "MySQL is down.";
You can’t perform that action at this time.