Commit c5aba9ed authored by Leon Byford's avatar Leon Byford

import some posts from previous blogs

parent bc824871
---
layout: post
title: Hatsune Miku on BBC Radio 3
tags: [music, Japan]
imported: true
redirect_from:
- /post/119679663691/as-part-of-the-9th-november-episode-of-private
- /post/119679663691/as-part-of-the-9th-november-episode-of-private/embed
---
As part of [the 9th November episode of *Private Passions*](https://www.bbc.co.uk/programmes/b04nql09) on BBC Radio 3, a rendition of Finnish song “Ievan Polkka” featuring synthesised vocals created using the Japanese Hatsune Miku Vocaloid software was broadcast.
Amusingly, neither the presenter nor the guest, Roger Law, knew what the track was. It was listed in the BBC Music database as “[Unidentified chinese music for the car](https://www.bbc.co.uk/music/tracks/n3nd8j)”.
Here is a recording I made of that section of the programme:
<audio src="https://s3.wasabisys.com/wasabi--cloud-88f11069-7e74-4a30-90fb-b6b91041271a/blog_media/2015-05-23-hatsune-miku-bbc-radio-3.mp3" controls></audio>
---
layout: post
title: Full resolution LINE sticker images
tags: [technology]
imported: true
excerpt_separator: <!-- more -->
redirect_from:
- /post/120266420762/full-resolution-line-sticker-images
- /post/120266420762/full-resolution-line-sticker-images/embed
---
![Screenshot showing a folder containing a number of Doctor Who LINE stickers](/images/line-stickers.png)
Ever wanted to get hold of high resolution image files of your favourite LINE stickers? It’s easy!
<!-- more -->
Firstly, find the sticker set you want to download in the [Sticker Shop](https://store.line.me/stickershop/) and click into its product page.
You should see a web address like the following in the address bar:
<https://store.line.me/stickershop/product/3333/en>
Make a note of the number towards the end, in this case 3333.
Now you can enter the following into the address bar, replacing 3333 with the number obtained just now:
<http://dl.stickershop.line.naver.jp/products/0/0/1/3333/iphone/stickers@2x.zip>
A zipped folder should now start downloading. Extract it to find the image files inside!
Some stickers are animated, and it is not possible to download animated stickers using the above method (the zipped folder will still download, but the images will be static). Instead, use the following web address:
<http://dl.stickershop.line.naver.jp/products/0/0/1/4324/iphone/stickerpack@2x.zip>
You’ll notice that the only difference in the web address is that `stickers` has been substituted with `stickerpack`. Also note that this web address will only work for sticker sets with animated stickers.
The `stickerpack` folder will still contain static versions of the stickers, but there is also a subfolder called `animation` which contains the animated versions. These files use the APNG format which isn’t widely supported. You can use tools such as [Animizer] to convert these into an animated GIF.
That’s all you need to know, but just for the sake of completeness, I’m including the original draft for this post which details an alternative (worse) method of accessing sticker limited files, albeit lower resolution images and only on OS X. It probably won’t be helpful to anyone, but who knows…
---
If you have downloaded LINE from the Mac App Store, it’s easy to get access to full resolution (complete with alpha channel) versions of stickers. They’re all stored in the following location:
`~/Library/Containers/jp.naver.line.mac/Data/Library/Containers/jp.naver.line/Data/Sticker/`
To get there, simply open up Finder and select `Go > Go to Folder…` from the menu at the top of the screen, then paste the above location into the box that appears.
The stickers are grouped into separate folders for each sticker set.
If you find that some stickers are missing, they may not have been downloaded. To fix this, just open up a new chat message and click on the sticker icon. There should be a button that lets you download all the stickers you own. Click this and you should now find all the stickers in the folder.
This is probably the easiest way to get access to the sticker image files if you have a Mac.
Note that animated stickers are stored in a subfolder called `animation` and use the APNG format which isn’t widely supported. You can use tools such as [Animizer] to convert these into an animated GIF.
[Animizer]: https://icons8.com/animizer
---
layout: post
title: How to tweet your toots with PHP and IFTTT
tags: [technology]
imported: true
excerpt_separator: <!-- more -->
---
*Note: To use this tool, you need access to a server where you can upload a PHP script that will run when queried over HTTP.*
[Mastodon](https://joinmastodon.org/) is a relatively new decentralised social network I’ve been trying out recently (you can find me at ~~[@ldjb@status.ldjb.uk](https://status.ldjb.uk/@ldjb))~~. It’s a lot of fun and I’m excited about the possibilities it opens up.
A number of us are currently taking part in [#woollyweek](https://morr.cc/woolly-week/), in which we log out of Twitter entirely for an entire week. In fact, in the longer term, I’d like to phase out my use of Twitter entirely and supplant it with Mastodon.
That, however, raises the question of how your Twitter followers will be able to find you on Mastodon. You can tweet out a link to your Mastodon profile and pin that tweet, which is probably a good idea, but even pinned tweets are unlikely to attract much attention in the longer term. What you really want to do is to tweet your toots.
<!-- more -->
---
What do I mean by tweeting your toots? I mean automatically posting your toots to Twitter. It’s not enough to simply tweet the contents of the toot -- you’ll want to link back to the toot, too, so people can find your Mastodon profile.
Some people have found [an easy method just with IFTTT](https://medium.com/@pimterry/sync-your-mastodon-back-to-twitter-3c72f2bc8626), but this didn’t meet my requirements. The issues are:
* The tweets don’t link back to the original toot;
* The tweets include boosts (I only want to tweet out my own toots);
* The tweets include replies (I don’t want toots intended for select individuals to appear on all my Twitter followers’ timelines);
* Any @mentions in a toot will be converted into a Twitter @mention (I don’t want random Twitter users to be receiving notifications left, right and centre).
So I had to find my own solution.
---
Alright, after that rather long preamble, here’s what I actually did.
I could have solved this problem with a running process, but I didn’t want an overly-complicated solution. Instead, I went with something simple -- a PHP script I can just upload to a server, and integrate that with [IFTTT](https://ifttt.com/).
Essentially, I created a proxy for the Atom feed generated by Mastodon. It strips out entries for anything other than my own toots (no boosts), it strips out toots beginning with `@`, and it replaces all remaining instances of the `@` symbol with `[AT]`, so as not to trigger any Twitter @mentions.
The code is a bit messy as I just wanted to get something up-and-running, but here it is:
```php
<?php
define("ATOM_FEED", "https://mastodon.social/@Gargron.atom");
define("NEW_STATUS_BY", "New status by");
header("Content-type: application/atom+xml; charset=utf-8");
$data = new SimpleXMLElement(file_get_contents(ATOM_FEED));
$toRemove = [];
for ($i=0; $i<count($data->entry); ++$i) {
if (strpos($data->entry[$i]->title, NEW_STATUS_BY) !== 0) {
array_unshift($toRemove, $i);
}
else {
$data->entry[$i]->content = strip_tags($data->entry[$i]->content, "<p><br>");
if (strpos($data->entry[$i]->content, "<p>@") === 0) {
array_unshift($toRemove, $i);
}
else {
$data->entry[$i]->content = str_replace("@", "[AT]", $data->entry[$i]->content);
}
}
}
foreach($toRemove as $i) {
unset($data->entry[$i]);
}
echo $data->asXML();
```
You’ll want to replace the URL to the Atom feed at the top of the script and upload the PHP file to your server. Also, if your Mastodon instance is not set to English, you’ll need to update the `NEW_STATUS_BY` constant to the appropriate string (and possibly adapt the code a little -- how to do so is left as an exercise for the reader).
Then you can create a new IFTTT applet, use the “New feed item” trigger in the Feed channel with the uploaded PHP script, and set the Action to “Post a tweet” in the Twitter channel. I set the tweet text to:
```{% raw %}
{{EntryContent}}
{{EntryUrl}}
{% endraw %}```
That way, both the toot text and a link to the toot are included in the tweet.
Since Mastodon has a character limit of 500 and Twitter has a character limit of 140, longer toots will be truncated to fit. The link to the toot will always remain intact, however.
And there you have it. By the way, I am releasing the code above into the public domain, so do with it as you like!
---
**EDIT:** By the way, if you get some sort of error message about failing to enable crypto, you can try adding your Mastodon Atom feed to [Feedburner](https://feedburner.google.com/), then pointing the PHP script to the Feedburner feed created.
---
layout: post
title: "Updated: Adding custom amounts to your Steam Wallet"
tags: [gaming]
excerpt_separator: <!-- more -->
redirect_from:
- /post/123200480682/adding-custom-amounts-to-your-steam-wallet
- /post/123200480682/adding-custom-amounts-to-your-steam-wallet/embed
---
![Screenshot showing the process of adding funds to a Steam Wallet](/images/steam-wallet.png)
*This post was originally written in 2015, but has been revised to reflect changes to the Steam service.*
PC game distribution service Steam allows users to purchase funds for their ‘Steam Wallet’ which can then be used to buy games and in-game content.
That can be done on [this webpage](https://store.steampowered.com/steamaccount/addfunds). It’s great if you want to add £4, £10, £25, £50 or £100 to your account, but what if for some reason you wanted to add an amount that’s not listed? Is this possible?
The answer is, of course, yes! But it requires a little trickery:
<!-- more -->
On the ‘Add funds to your Steam Wallet’ webpage, enter the following into your web browser's address bar:
```js
javascript:submitAddFunds({dataset:{amount:401,currency:"GBP"}});
```
{:.console}
You can replace `401` with the amount you want to add in pence. `401` means £4.01. If you wish to use a different currency, replace `GBP` with the currency's [ISO 4217 code](https://www.iso.org/iso-4217-currency-codes.html).
Pressing the Return key will direct you to pay for your funds.
Note that when they say £4.00 is the “minimum fund level”, they’re not kidding! It’s unfortunately not possible to add less than this amount, even with this method. There also appears to be an upper limit somewhere between £300 and £400.
......@@ -5,6 +5,8 @@ tags: [technology]
excerpt_separator: <!-- more -->
---
![Screenshot of SnooZy Charger showing a large number of charges in the middle of the night](/images/snoozy.png)
The Android operating system (as does iOS, I believe) has a rather annoying "feature". That is, whenever your device starts charging, its screen turns on, presumably to let you know that the device is now charging.
This sort of feedback is usually considered good interaction design. It's important to inform the user when events occur. However, this must not come at the expense of annoying and inconveniencing the user.
......@@ -29,6 +31,4 @@ This way, the app will prevent the phone's screen from turning on whenever the p
There is one slight nuisance that comes with using this app, however. After SnooZy Charger has prevented the screen from turning on, the next time you want to unlock your phone, you must enter your passcode to do so, and not via fingerprint scanner or some other means. This is [a limitation of the Android operating system](https://github.com/mudar/SnooZy/issues/18) that will hopefully be rectified in a future version of Android.
One additional nifty feature of SnooZy Charger is the ability to view when your device started and stopped charging. As you can see, the app has prevented my phone's screen from lighting up many times through the night!
![Screenshot of SnooZy Charger showing a large number of charges in the middle of the night](/images/snoozy.png)
One additional nifty feature of SnooZy Charger is the ability to view when your device started and stopped charging, as can be seen in the screenshot at the top of this post. It is evident that the app has prevented my phone's screen from lighting up many times through the night!
......@@ -8,15 +8,15 @@ title: Archive
{% for post in site.posts %}
<li {% if post.date > site.time %}class="future" {% endif %}data-pubdate="{{post.date|date: "%F"}}"><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a> ({{ post.date | date: "%F" }})</li>
{% endfor %}
<li><a href="https://medium.com/@ldjb/how-to-tweet-your-toots-with-php-and-ifttt-2ee891b9cf3e">How to tweet your toots with PHP and IFTTT</a> (2017-04-28)</li>
<!-- <li><a href="https://medium.com/@ldjb/how-to-tweet-your-toots-with-php-and-ifttt-2ee891b9cf3e">How to tweet your toots with PHP and IFTTT</a> (2017-04-28)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/126174584429/when-marnie-was-there">When Marnie Was There</a> (2015-08-08)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/125594894599/the-japanese-take-their-table-manners-very">The Japanese Tradition – Sushi</a> (2015-08-01)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/125001313990/inside-out">Inside Out</a> (2015-07-25)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/124406810015/the-bbc-proms-are-underway">The BBC Proms are underway!</a> (2015-07-18)</li> -->
<li><a href="http://tumblr.ldjb.uk/post/123200480682/adding-custom-amounts-to-your-steam-wallet">Adding custom amounts to your Steam Wallet</a> (2015-07-04)</li>
<!-- <li><a href="http://tumblr.ldjb.uk/post/123200480682/adding-custom-amounts-to-your-steam-wallet">Adding custom amounts to your Steam Wallet</a> (2015-07-04)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/120853501767/former-staff-from-renowned-game-developer-rare-are">Yooka-Laylee</a> (2015-06-06)</li> -->
<li><a href="http://tumblr.ldjb.uk/post/120266420762/full-resolution-line-sticker-images">Full resolution LINE sticker images</a> (2015-05-30)</li>
<li><a href="http://tumblr.ldjb.uk/post/119679663691/as-part-of-the-9th-november-episode-of-private">Hatsune Miku on BBC Radio 3</a> (2015-05-23)</li>
<!-- <li><a href="http://tumblr.ldjb.uk/post/120266420762/full-resolution-line-sticker-images">Full resolution LINE sticker images</a> (2015-05-30)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/119679663691/as-part-of-the-9th-november-episode-of-private">Hatsune Miku on BBC Radio 3</a> (2015-05-23)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/119106119278/higurashi-when-they-cry-on-steam">Higurashi When They Cry on Steam</a> (2015-05-16)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/118809183980/touhou-project-arrives-in-the-west">Touhou Project arrives in the West</a> (2015-05-12)</li> -->
<!-- <li><a href="http://tumblr.ldjb.uk/post/117855284075/wastemen-bbc-two">Wastemen - BBC Two</a> (2015-05-01)</li> -->
......
......@@ -10,7 +10,7 @@ redirect_from: /rss
<title type="html">{{ site.name }}</title>
<subtitle>{{ site.description }}</subtitle>
{% for post in site.posts %}
{% if post.date <= site.time %}
{% if post.date <= site.time and post.imported != true %}
<entry>
<title type="html">{{ post.title | escape }}</title>
<link href="{{ site.url }}{{ site.baseurl }}{{ post.url }}" rel="alternate" type="text/html" title="{{ post.title | escape }}" />
......
---
redirect_from:
- /post/119679663691/as-part-of-the-9th-november-episode-of-private
- /post/119679663691/as-part-of-the-9th-november-episode-of-private/embed
redirect_to: http://tumblr.ldjb.uk/post/119679663691/as-part-of-the-9th-november-episode-of-private
---
---
redirect_from:
- /post/120266420762/full-resolution-line-sticker-images
- /post/120266420762/full-resolution-line-sticker-images/embed
redirect_to: http://tumblr.ldjb.uk/post/120266420762/full-resolution-line-sticker-images
---
---
redirect_from:
- /post/123200480682/adding-custom-amounts-to-your-steam-wallet
- /post/123200480682/adding-custom-amounts-to-your-steam-wallet/embed
redirect_to: http://tumblr.ldjb.uk/post/123200480682/adding-custom-amounts-to-your-steam-wallet
---
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment