Skip to content

Instantly share code, notes, and snippets.

View aozimkov's full-sized avatar
❄️
Happy coding!

Aleksey Ozimkov aozimkov

❄️
Happy coding!
View GitHub Profile
@torgeir
torgeir / resize-home-folder-partition-on-ubuntu-snappy-core-on-the-raspberry-pi-2.md
Last active January 27, 2023 14:36
Resize home folder partition on ubuntu snappy core on the raspberry pi 2

Note where home is

(RaspberryPi2)root@localhost:~# df -h /home/
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p4   1.6G 1.3G   160M  89% /oem
(RaspberryPi2)root@localhost:~# df -h
@mkdizajn
mkdizajn / function.php
Last active May 6, 2020 15:59
Wordpress Bootstrap 3 responsive images
<?php
//----------------------------------------------------------/
// responsive images [ 1) add img-responsive class 2) remove dimensions ]
//----------------------------------------------------------/
function bootstrap_responsive_images( $html ){
$classes = 'img-responsive'; // separated by spaces, e.g. 'img image-link'
// check if there are already classes assigned to the anchor
if ( preg_match('/<img.*? class="/', $html) ) {
@pix0r
pix0r / scrape-sitemap.sh
Last active December 24, 2022 00:21
Use wget to scrape all URLs from a sitemap.xml Usage: scrape-sitemap.sh http://domain.com/sitemap.xml
#!/bin/sh
SITEMAP=$1
if [ "$SITEMAP" = "" ]; then
echo "Usage: $0 http://domain.com/sitemap.xml"
exit 1
fi
XML=`wget -O - --quiet $SITEMAP`