Skip to content

Instantly share code, notes, and snippets.

Joseph Finlayson josephfinlayson

Block or report user

Report or block josephfinlayson

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 gist:2b8967635e7bab6a4d8d
artoo.scrape('tr.song-row', {
title: {sel:'td[data-col="title"] span'},
artist : { sel:'td[data-col="artist"] span'},
album : {sel:'td[data-col="album"] span'}
}, artoo.saveCsv);
// saves google music songs/playlists
@josephfinlayson
josephfinlayson / gist:10107900
Created Apr 8, 2014
Auto like downloadable songs on soundcloud. Good combined with an IFTTT
View gist:10107900
javascript:(function()%7B%24('.sc-button-download').each(function(key%2Cval )%7Blike %3D %24(val).parent('div')%3Blike %3D %24(like).children('button.sc-button-like'); like.trigger("click")%7D)%7D)()
View gist:7309474
curl https://raw.github.com/adimania/arch-desktop-environments/master/XFCE-Arch-RPi.sh | bash
@josephfinlayson
josephfinlayson / gist:7283759
Last active Dec 27, 2015
backup SD card image of pi
View gist:7283759
sudo fdisk -l
//find active sd card
// copy image over
ssh pi@raspberry sudo dd if=/dev/mmcblk0 | gzip -c > raspberry.img.gz
View gist:7228851
sudo mount -t cifs //bthub/usb1 hdd -o rw
@josephfinlayson
josephfinlayson / gist:6209492
Last active Dec 20, 2015
vanity url remover
View gist:6209492
DELETE *
FROM `wp_postmeta`
WHERE `meta_key` = 'vanity_url'
OR `meta_key` = '_dest_page_id'
DELETE *
FROM `wp_posts`
WHERE `post_type` = 'vanity_url'
DELETE FROM `wp_fusion`.`wp_posts` WHERE `wp_posts`.`ID` = 489 LIMIT 1;
View gist:6175060
arr=(git@github.com:asd/dasde.git
git@github.com:asform/dni_wpasdager.git
)
for git in "${arr[@]}"
do
git clone $git
done
@josephfinlayson
josephfinlayson / gist:6089286
Created Jul 26, 2013
Shell script to pull updates from git for all subfolders
View gist:6089286
files=`ls $1`
for file in $files; do
if [ -d $file ];then
cd $file
git pull
git checkout rel-15
cd ..
fi
done
@josephfinlayson
josephfinlayson / gist:5489278
Created Apr 30, 2013
Select shapes by style and colour, extract text, in powerpoint
View gist:5489278
Sub GetAllText()
Dim p As Presentation: Set p = ActivePresentation
Dim s As Slide
Dim sh As Shape
For Each s In p.Slides
For Each sh In s.Shapes
If sh.HasTextFrame Then
If sh.Type = msoShapeStylePreset1 Then
If sh.Fill.ForeColor = RGB(242, 242, 242) Or sh.Fill.BackColor = RGB(242, 242, 242) Then
If sh.TextFrame.HasText Then
@josephfinlayson
josephfinlayson / gist:2519418
Created Apr 28, 2012
useful perl script to rename files+ a number
View gist:2519418
NUM=0 ; for FILE in * ; do NUM=`expr $NUM + 1` ; mv $FILE $NUM\.jpg ; done
You can’t perform that action at this time.