Skip to content

Instantly share code, notes, and snippets.

@StudioLE
StudioLE / update.sh
Last active August 29, 2015 14:26
Chain apt-get update > upgrade > dist-upgrade > autoremove
#!/bin/bash
echo "apt-get update & upgrade wizard"
echo "Would you like to assume yes? [y/n]"
read input_force
if [ $input_force = y ]
then
force="--yes"
fi
@StudioLE
StudioLE / update.sh
Last active April 3, 2016 10:07
Shell Tools Suite
#!/bin/bash
echo "apt-get update & upgrade wizard"
echo "Would you like to assume yes? [y/n]"
read input_force
if [ $input_force = y ]
then
force="--yes"
fi
@StudioLE
StudioLE / git-rm-cached.sh
Last active August 29, 2015 14:26
Remove folder from .git but not from local
# http://stackoverflow.com/questions/1947430/git-remove-directory
# Remove from cache
git rm -r -f --cached DIR_NAME
# Then add DIR_NAME to .gitignore
for ($i = 1; $i <= 100; $i++) {
if ($i % 3 == 0) {
echo "Fizz";
}
elseif ($i % 5 == 0) {
echo "Buzz";
}
else {
echo $i;
}
@StudioLE
StudioLE / plex-update.sh
Created February 8, 2016 11:29
Download and install Plex updates
#!/bin/bash
# From: https://forums.plex.tv/discussion/comment/1059738/#Comment_1059738
wget -q -O- https://plex.tv/downloads/1/archive | grep "downloads.plex.tv.*amd64.deb" | head -1 | sed -e "s/.*https/https/" -e "s/amd64.deb.*/amd64.deb/" | xargs wget -q -nc; ls -t *amd64.deb | head -1 | xargs dpkg -i -E
@StudioLE
StudioLE / .block
Last active April 15, 2018 07:44 — forked from mbostock/.block
Hive Plot (Links)
license: gpl-3.0
@StudioLE
StudioLE / README.md
Created September 7, 2016 08:58 — forked from danbri/README.md
Schema.org hierarchy Sunburst
@StudioLE
StudioLE / request.sql
Last active September 25, 2016 14:36
Wikidata Graph: Connect places by architectural style in city
# Wikidata Query Service at:
# https://query.wikidata.org/
#defaultView:Graph
SELECT ?place ?placeLabel ?location ?style ?styleLabel ?instanceLabel
# SELECT ?style ?styleLabel (count(*) as ?count)
WHERE {
wd:Q84 wdt:P625 ?loc . # Geo-coords of Newcastle upon Tyne: Q1425428; London:Q84
SERVICE wikibase:around {
@StudioLE
StudioLE / IntentSchema.json
Created January 4, 2017 22:20
Control Chromecast with the Amazon Echo via HomeAssistant
{
"intents": [
{
"intent": "MediaPlayIntent",
"slots": []
},
{
"intent": "MediaPauseIntent",
"slots": []
},
@StudioLE
StudioLE / crontab -e
Created January 21, 2017 22:08
Sync directory to S3
*/5 * * * * ~/sync.sh >> ~/sync.log 2>&1