Browse Source

New post and updated file name format

master
Siina Mashek 2 months ago
parent
commit
b98ef13620
5 changed files with 62 additions and 1 deletions
  1. +1
    -0
      config.toml
  2. +1
    -1
      content/blog/fiddling-around.md
  3. +0
    -0
      content/blog/hello.md
  4. +25
    -0
      content/blog/learning-elixir.md
  5. +35
    -0
      content/bookmarklets/humblebundle.md

+ 1
- 0
config.toml View File

@@ -14,6 +14,7 @@ theme = "siinamin"
[outputs]
home = ["HTML","RSS"]
blog = ["HTML","RSS"]
bookmarklets = ["HTML"]

[menu]
[[menu.main]]


content/blog/20200703-fiddling-around.md → content/blog/fiddling-around.md View File

@@ -24,7 +24,7 @@ Things I need to do very soon:

Comments via [Fediverse post][fp].

[atom]:https://siina.wtf/index.xml
[atom]:https://siina.wtf/blog/index.xml
[ts]:https://terminal.sexy
[gh]:https://github.com/stayradiated/terminal.sexy/blob/master/dist/schemes/collection/invisibone.json
[yey]:https://cute.science/notice/9whab3a4c0lDP8nmqG

content/blog/20200701-hello.md → content/blog/hello.md View File


+ 25
- 0
content/blog/learning-elixir.md View File

@@ -0,0 +1,25 @@
---
title: "Learning Elixir"
date: 2020-07-12T20:19:19+03:00
---

For the last few days, I have been fangirl-vomiting my excitement over [Elixir][] at one of my boyfriends as well as various other friends. Reading through their "getting started" has got me thinking over my existing chatbot and finding ways that this will make life a ton easier, especially since Python is getting a bit slow for what I do. Not to mention I'm starting to really dislike using pip (and dependencies in general).

I have done some functional programming in the past, but never got too deeply into it. haskell kinda scared me away. Elixir, on the other hand, has got me so ridiculously excited and stoked to program again. Finally digging into it was the best decision I've made in 2020.

Some of the things that got me ridiculously excited early on include:

* variable pinning
* functions able to have multiple clauses
* ease of reading/writing files
* Task/Process/Agent
* `=` being a match operator
* lexical scopes

I have been meaning to write my bot in Elixir for some time now, but have always kept to the comfort that is the already-knowing of Python. I have three or four independent little bots that I use regularly, and with Elixir, I think I can easily make them into one bot. So far, I don't feel like I'm fighting with Elixir to make it do what I want, as I am often lately feeling with Python (which is why the current bot is split into different pieces).

Putting it all into practice has been pretty wonderful experience and I look forward to sharing the code I have been writing!

Comments via [Fediverse post](https://cute.science/notice/9x16RDQIEsxZA26DSK)

[Elixir]:https://elixir-lang.org

+ 35
- 0
content/bookmarklets/humblebundle.md View File

@@ -0,0 +1,35 @@
---
title: "Siina's Humble Bundle Bookmarklet"
index: false
---

Drag the following link to your bookmarks toolbar and use it on Humble Bundle's website to generate my parnter link at any time! You can do it on any Humble Bundle page.


## Instructions
After vising the desired Humble Bundle page, simply click the bookmarklet. The page will magically activate as a partner link and help me out.

You can also copy the new address in the address bar to give to others!

You will notice that it has added `?partner=siinacutie` to the end of the address -- this is my partner ID.


If you use this, I appreciate it very much! <3

<a href="javascript:(function()%7Bjavascript%3A(function()%7B%0A%09if(window.location.hostname%20!%3D%3D%20%22humblebundle.com%22)%20%7B%0A%09%09alert(%22This%20only%20works%20on%20humblebundle.com%20pages%22)%3B%0A%09%7D%20else%20%7B%0A%09%09var%20current%20%3D%20window.location.hostname%20%2B%20window.location.pathname%3B%0A%09%09window.open(%22https%3A%2F%2F%22%20%2B%20current%20%2B%20%22%3Fpartner%3Dsiinacutie%22%2C%20%22_self%22)%3B%09%09%0A%09%7D%0A%7D)()%3B%7D)()%3B">Siina's Humble Bundle Partner Linker</a>

## JavaScript Source
The following is the entire script run in the bookmarklet. I am posting it here so you can verify that the bookmarklet and this is the same. If you are also a Humble Partner, feel free to edit it for your own partner ID. Or if you wanna support someone else that isn't me, you can also do that! I just wanted to make it super easy for people to use this without having to remember to manually add a partner ID. <3

I do not use `window.location.href` because it will return any tracking arguments too, and those make for awfully long sharing links. They also are trackers, which I'm not keen on.

```javascript
javascript:(function(){
if(window.location.hostname !== "humblebundle.com") {
alert("This only works on humblebundle.com pages");
} else {
var current = window.location.hostname + window.location.pathname;
window.open("https://" + current + "?partner=siinacutie", "_self");
}
})();
```

Loading…
Cancel
Save