HTTPposting
This is beyond science.
This is beyond science.
let's see if this works
Following is a user script that embeds a thumbnail into the topic header. Was supposed to be trivial, but walking around the CSRP was not that easy. Luckily, someone had written a nice useful custom Base64 encoder, because I spent more than an hour trying to get btoa to do the thing.
// ==UserScript==
// @name tildesYoutubeThumbs
// @version 1
// @grant GM.xmlHttpRequest
// @namespace tildes.net
// @include https://tildes.net/~*/*
// ==/UserScript==
let youtubeIcon = document.querySelector('div.topic-icon-youtube_com')
if(youtubeIcon !== null) {
let youtubeLink = youtubeIcon.nextSibling.nextSibling.href;
let youtubeID = new URL(youtubeLink).searchParams.get('v');
let thumbnailUrl = "https://img.youtube.com/vi/" + youtubeID + "/0.jpg";
GM.xmlHttpRequest({
method: "GET",
url: thumbnailUrl,
overrideMimeType: 'text/plain; charset=x-user-defined',
onload: function(response) {
if(response.status === 200) {
let thumbElement = document.createElement('img');
let thumbParentDiv = document.createElement('div');
let header = document.querySelector('article.topic-full > header');
let data = "data:image/jpeg;base64," + customBase64Encode(response.responseText);
thumbElement.src = data;
thumbElement.style = 'width: 60%; margin: auto';
thumbElement.id = 'gk-youtube-thumbnail';
thumbParentDiv.style = 'width: 100%; text-align:center;';
header.appendChild(thumbParentDiv);
thumbParentDiv.appendChild(thumbElement);
}
}
});
}
// https://stackoverflow.com/questions/8778863/downloading-an-image-using-xmlhttprequest-in-a-userscript/8781262#8781262
function customBase64Encode (inputStr) {
var
bbLen = 3,
enCharLen = 4,
inpLen = inputStr.length,
inx = 0,
jnx,
keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+ "0123456789+/=",
output = "",
paddingBytes = 0;
var
bytebuffer = new Array (bbLen),
encodedCharIndexes = new Array (enCharLen);
while (inx < inpLen) {
for (jnx = 0; jnx < bbLen; ++jnx) {
/*--- Throw away high-order byte, as documented at:
https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data
*/
if (inx < inpLen)
bytebuffer[jnx] = inputStr.charCodeAt (inx++) & 0xff;
else
bytebuffer[jnx] = 0;
}
/*--- Get each encoded character, 6 bits at a time.
index 0: first 6 bits
index 1: second 6 bits
(2 least significant bits from inputStr byte 1
+ 4 most significant bits from byte 2)
index 2: third 6 bits
(4 least significant bits from inputStr byte 2
+ 2 most significant bits from byte 3)
index 3: forth 6 bits (6 least significant bits from inputStr byte 3)
*/
encodedCharIndexes[0] = bytebuffer[0] >> 2;
encodedCharIndexes[1] = ( (bytebuffer[0] & 0x3) << 4) | (bytebuffer[1] >> 4);
encodedCharIndexes[2] = ( (bytebuffer[1] & 0x0f) << 2) | (bytebuffer[2] >> 6);
encodedCharIndexes[3] = bytebuffer[2] & 0x3f;
//--- Determine whether padding happened, and adjust accordingly.
paddingBytes = inx - (inpLen - 1);
switch (paddingBytes) {
case 1:
// Set last character to padding char
encodedCharIndexes[3] = 64;
break;
case 2:
// Set last 2 characters to padding char
encodedCharIndexes[3] = 64;
encodedCharIndexes[2] = 64;
break;
default:
break; // No padding - proceed
}
/*--- Now grab each appropriate character out of our keystring,
based on our index array and append it to the output string.
*/
for (jnx = 0; jnx < enCharLen; ++jnx)
output += keyStr.charAt ( encodedCharIndexes[jnx] );
}
return output;
}
welcome to debate #1, night 2. the first thread on this turned out to be about twice as active as i was expecting (i estimated at most 50 or so replies), and that was for the "undercard" so unless something changes with this night, i think we'll be doing these in pairs from here on out--at least until either the DNC pushes out enough candidates for one debate, or activity drops significantly in these threads. previous night's thread can be found here if you'd like to continue the discussions of last night's candidates. anyways here are all the details you'd ever need, and probably then some:
first off, i recommend you sort by newest first instead of the default since this thread will likely be semi-active and covering a live event.
The debate is being broadcast by NBC News, MSNBC and Telemundo, and will air live across all three networks starting at 9 p.m. ET.
Telemundo will broadcast the debate in Spanish.
The debate will stream online free on NBC News' digital platforms, including NBCNews.com, MSNBC.com, the NBC News Mobile App and OTT apps on Roku, Apple TV and Amazon Fire TV, in addition to Telemundo's digital platforms.
livestreams will also be available on Twitter, Facebook, and Youtube because the DNC mandated that of its partners for the debates.
Democratic Presidential Debate: See The 20 Candidates Who Will Be Onstage
Bennet is running on fixing a broken political system, the blame for which he puts at the feet of Republican Senate leader Mitch McConnell. Bennet says spending from wars and tax cuts was essentially the U.S. lighting “money on fire.”
Biden’s top concern is less about reshaping America and more about returning America to “normalcy.” He argues that if President Trump gets another four years, the DNA of the country will be fundamentally altered.
The 37-year-old is making a generational-change argument. He argues for progressive processes — like fixing redistricting and voting rights — in addition to policies — like being more cautious on war and more progressive on climate change and health care.
She’s focused on women’s rights, especially when it comes to health care. She boasts that a Fox host called her “not very polite” for speaking out about the “nationwide assault on women’s reproductive freedoms” and “fundamental human rights for women.”
Harris’ slogan is “for the people,” and she’s making the case that President Trump is a “fraud.” The former prosecutor says Trump is fighting for the wrong people — the powerful and wealthy — while she wants to “advocate for the voiceless and vulnerable.”
The centrist has a pragmatic message. He says pragmatists aren’t against big things; they know how to get them done. He has also spoken out against Democrats’ lurch toward socialism, warning that moving in that direction would reelect President Trump.
Sanders wants to beat President Trump, but he believes the way to do it is not with “middle-ground” approaches, but with promising wholesale progressive change. He’s the only candidate willing to wear the (democratic) socialist label.
He has focused his campaign on ending gun violence in the country, targeting semiautomatic assault weapons in particular by calling for a mandatory national ban and buyback.
The New Age author is campaigning with a philosophy of “Think. Love. Participate.” As an outsider to politics, she believes change needs to come from the outside and that “half-truth tellers” can’t beat President Trump.
The startup investor is running on a data-first approach to the presidency. His big idea is to address the threat of automation with a Universal Basic Income, in which every adult would get $1,000 a month.
Candidates will have 60 seconds to answer questions and 30 seconds to respond to follow-ups. No opening statements, though candidates will have a chance to deliver closing remarks.
Five segments each night separated by four commercial breaks.
NPR has 7 questions of their 8 for the debates which apply to today's debate:
Will Biden stand up to the scrutiny?
Is the debate an opportunity or danger zone for Bernie Sanders?
Can Harris and Buttigieg stand out?
Do the pragmatists or progressives win out?
How much of a focus is Trump?
How will foreign policy factor in?
Who will stick in voters' minds?
other pre-debate analysis pieces that may be pertinent to you:
Video game's approach to storytelling usually comprise of mixing gameplay mechanics (gunplay, health system, enemy AI...) and storytelling elements (cutscenes, dialogue trees, environment details...). There are also special systems designed to work both as gameplay challenge as well as narrative carriers (quick time events, the nemesis system in Shadow of War...)
However, there's also a third approach, where traditional gameplay elements when put into appropriate context within the game gain additional narrative significance (the way Thomas was Alone's basic platforming mechanics are personified via narration, or Undertale's combat system being integral to how the story develops...)
Have you ever noticed if a gameplay element also doubled as a storytelling device in the games you played before? If so, what was it and what did it "tell" you?
This is something I've been thinking about a lot lately, especially in light of some recent threads, and because my own account here is nearing 1 year old. I don't think I've seen this come up yet, but it's possible I missed something. I'd really just like to see what the consensus is here, especially now that the site is fairly large.
Anyways, what I define as 'recruiting' is responsibly (preferably privately) messaging someone who hasn't posted on the /r/Tildes subreddit or reached out in some other way, and asking if they would be interested in joining the platform. My reasons for wanting to do this are two- fold:
For one, on the rare occasion that you come across someone who seems like a good fit for this site, and who is trying to contribute meaningfully to reddit but obviously getting frustrated, it just seems like the right thing to do. Wouldn't you want someone to reach out and let you know there is something better?
Secondly, it's a good way to grow representation of niche ideas, which could later evolve in subgroups. Have a favorite programming language you'd like to see represented here more? Maybe a favorite hobby? Whatever the case, I think most people are part of some kind of niche interest that they would like to see more of here.
I've been curious about making a switch for ergonomics and just lack of space on my desk.
Do you recommend it for gaming? Any guidance on genres that do or don't work? I mostly play real time and turn based strategy games or point-and-click style games such as Diablo on my computer. I don't generally go in for twitchy FPSes, but I'd like the option.
Opinions on index vs. thumb?
How long was the adjustment period to get used to it?
Any recommendations on good ones to buy?
Are there any advantages I'm not thinking of besides just being better for my wrist?
Disadvantages besides, potentially, being less precise than a mouse?
Are there any tradeoffs with going wireless?
I really enjoyed Peele's new Twilight Zone. It's a bit hit and miss - but most anthology shows have this. Some episodes are great, most are good enough, a couple are forgettable.
The critic reviews (based on the first four episodes) are all over the place, with scoring ranging from 100 to 10. The user reviews are the usual tyre-fire of awfulness. https://www.metacritic.com/tv/the-twilight-zone-2019
I found Replay to be genuinely upsetting and it was the episode that stayed with me longest. I get the impression that this episode split the audience and a bunch of people dislike the social commentary. (Or something, I dunno, I can't understand the mindset that criticises a show for something like this).
So I'm interested in your opinions. Have you watched it? Did you enjoy it?
On lobste.rs I found link to an article from Vidar Holen, the author of shellcheck. He made a fork bomb that is really interesting. Here's the bomb:
DO NOT RUN THIS.
eval $(echo "I<RA('1E<W3t`rYWdl&r()(Y29j&r{,3Rl7Ig}&r{,T31wo});r`26<F]F;==" | uudecode)
This may look pretty obvious, but it's harder than you think. I fell for it. twice. Can you find out how this bomb works?
Warning: executing the bomb will slow down your computer and will force you to restart.
You can limit impact of the fork bomb by setting FUNCNEST.
export FUNCNEST=3
Have fun!
I am working on an app called Percent Done that is a combination of goal setting, time tracking and habit tracking.
I like setting time-based goals for myself every day, such as “write for an hour” or “work on Percent Done for four hours.”
I also like Seinfeld’s “don’t break the chain” method. For example, Apple Watch shows you how many days you have completed your exercise circle and tells you that you have been keeping at it for x days.
Percent Done is a marriage of these two concepts. It allows you to set goals and track the time you spend on them, as well as how many days in a row you have consistently completed them. For example, you can add a goal that says “write for an hour every day,” and Percent Done will notify you every day to write for an hour. You will be able to tap on this goal and Percent Done will start counting back from one hour. You will also be able to see how many days in a row you have written for an hour.
You can also add one-time goals to Percent Done with or without time tracking, so it is a task management tool as well.
You can play with the design prototype here: Percent Done design prototype
I would really love to get your feedback on this. If you are interested in being a beta tester, feel free to reply to this topic or e-mail me at "hi at evrim dot io."
By the way, this is almost completely a self-promotion post. If it is against the rules, I'd be happy to remove this.
@cadadr's 4 word poetry challenge is one of my favorite Tildes threads to read through on account of the many clever and thoughtful responses, so I figured I'd try to kick off another one. This one is a little more conceptually involved, but I think it still has the potential to be a good time like the last one.
Rather than going with a strict word or line count, instead I am creating a restriction based around personification:
Challenge:
Your poem must:
An example might be an automatic door that is bored to tears from opening and closing ad nauseum. Or maybe a watering can that is excited to tend to its garden.
In trying to come up with a model I decided to channel a resentful milk carton:
It's fine
I get it
You don't have to justify yourself
Lots of better things have come around
Since you first chose me
Just know that I'm still here
If you need me
Waiting for that blissful moment
Where you light up my world
And take me in your hand
And make me feel like I'm flying
Before you lower me down
In a lover's embrace
It's fine
I get it
Until then I'll sit here
In the cold, cold dark
Trying not to go sour
Next to the slowly molding cheese
And forgotten grapes
It's far from perfect but hopefully it gives you an idea of what the assignment can look like. While I saved my "reveal" to the end, don't feel obligated to use that tactic unless you want to. You don't have to hide the identity of your object, just don't name the object outright in the poem.
Feel free to make your poem as long or short as you wish. Feel free to make it as meaningful or silly as you want. Above all else, have fun!
If you need help with ideas or just want the challenge of writing to a randomly selected specification, you can use this noun generator for objects and this adjective generator for sentiments.
Shovel Knight is essentially an NES game that got released in 2014, as its design and artwork are deliberately reminiscent of games for that system. It's a definitive example of an answer to the question, but I'm also interested in games that weren't necessarily intended to be throwbacks but can be interpreted as such by nature of their execution.
What are other examples of games that feel like they could have been released for, say, the Dreamcast, PSOne, SNES, or any of the other consoles of yesteryear? Furthermore, what are the defining traits they possess that make them fit in on that system?
I've just been interested recently and I'm curious what people have to say.