Tumgik
#so maybe it's possible to offload apps too? so if i was going to even try archiving Something that would be the way
n7punk · 9 months
Text
how insane (and probably difficult) would it be of me to try to archive the android version of the she-ra apps
87 notes · View notes
Text
the real fucker about learning to work with instead of against my brain is that...when I figure out how to do that, it’s great. I have a lightbulb moment and I recognize that the way I “should” be doing things isn’t working for me and why, and I get an obvious-in-hindsight idea for what I can do instead, and it almost invariably works. in many cases the root of all these things is realizing that no, I’m absolutely not going to just remember whatever thing I think I should remember, and the solution is a low-effort way of offloading the task of remembering so that I don’t have to remember the thing anymore and instead I have some external thing to remember for me (which also frees up a not-insignificant amount of mental/emotional bandwidth, because I no longer have to have as many “ah shit I need to remember this” processes running in the background). 
so, I mean, I broadly know what I need to do in order to lower my stress levels, manage my shit, and feel more in control of my life, or at least I know one of the major things I need to do, and it’s the same thing I’d do with a computer that’s running slow: check the Task Manager, figure out what’s draining resources, and shut that shit down. end all the unnecessary processes running in the background. close some open tabs in my browser, maybe by saving them to bookmarks instead (where they’ll end up being forgotten, but that’s another issue). unfortunately, translating that into something that works for my brain is...often pretty individual to the task, which means I end up needing multiple systems for doing what is essentially the same thing, and it turns out? coming up with multiple systems is HARD.
like...I think I would have a better handle on basically everything if I could...externalize my brain as much as possible. I already do this a lot with my planner and my to-do list app, but the first fails when it can’t let me go more in-depth on specific steps of a task, and the second fails when it lets me go too much in-depth and I keep making lists, and lists of lists, and new lists that end up repeating old lists because it wasn’t organized well and I forgot the old lists existed, and the whole thing gets so unwieldy that I remember only a handful of what’s in there, which means it’s no longer useful as a way to not forget things. this is also why I use sites like GoodReads, Grouvee, and Trakt.tv, and why I get so obsessive about sorting and categorizing my shit as comprehensively as possible, because I will never remember most of it otherwise. if I had something that would like...let me start from an extremely broad level and move down into nodes and sub-nodes and sub-sub-nodes, and different nodes could show up in or be linked to multiple places whenever it makes sense, then...maybe I could externalize everything, and I wouldn’t spend so much time feeling like I’m forgetting things. I just don’t know what kind of system would let me set up something like that.
or on a smaller level, even (maybe as part of this thing I wish I had), I need like...a brain pop-up. when I feel like I’m forgetting something, or I think I might be, a nice little message pops up with a list of things that would be good for me to do daily or that expire soon or that I vaguely wanted to do yesterday but didn’t have time or that I’ve forgotten about before (although of course a list like that is only useful as long as it stays short and that would be another problem right there). or another pop-up is triggered when I’m mindlessly scrolling Twitter or Tumblr, to say “hey maybe you want to do this thing instead”. or another one when I’m sitting in the bathroom mindlessly scrolling Twitter/Tumblr or rereading a fic I’ve already read a million times, just kind of “hey instead why don’t you play this game, or read one of the many books on your phone, or an ebook you actually got from the library, or comics in one of your comics apps”. because you’d think those would be easy things to remember but it turns out they’re not, or at least I need the reminder that I should remember them, and in the absence of a literal actual brain pop-up I don’t know how to do it. like, if I write a physical note, that’s no good for several reasons. if I write a note on my phone, that’s better probably, but I still have to remember it exists. which I won’t. I could set timed reminders but they’re unlikely to happen at the right times...and I suppose I could turn an image of a list into my lock screen but I like my Loki lock screen.
I don’t know. I need to brainstorm more, I guess. I just don’t know how to get from here to something I can actually use, with the vast majority of my brain problems.
7 notes · View notes
vernonfielding · 5 years
Text
Life Writes Its Own Stories
Chapter 4 (and on AO3).
AN: In case anyone's paying attention, I'll be screwing around with my posting schedule over the next few chapters, just to account for Real Life events. Chapter 5 will be up tomorrow, though.
Jake scrubbed a hand over his face and sat back in his chair with a sigh. He and Rosa had been stuck all week in the Terrible Case Trifecta: boring crime (vehicle break-ins), asshole victims (Williamsburg millennials), and no leads. The thefts hadn’t even been in their precinct, technically, but the Eight-Four had offloaded the case because the first report had come from a victim who worked nearby and had filed through the Nine-Nine.
But it wasn’t just the tedious case that was making Jake irritable. He propped his chin in his hand and glanced at his cell phone again – no new messages. He glanced covertly at the desk across from him, making sure Rosa was still in the bathroom, and picked up the phone. Maybe he’d somehow missed a text. He pulled up the app and nope – his last text from Santiago had been 10 days ago.
“Dude, stop it,” Rosa said, from way too close behind him. Jake jerked up in his chair and dropped the phone.
“But I don’t want to miss a text from your mom,” Jake said, snidely.
Rosa shot him a solid death glare as she sat back at her desk.
“What have I told you about bringing up my parents?”
“Don’t.”
“Exactly.”
Jake flipped the phone over  so he wouldn’t be tempted to glance at the screen every few seconds.
The past week and a half had been, frankly and disturbingly, torture. After meeting Santiago, he’d left Prospect Park feeling euphoric – a word Rosa had thrown at him (as in “You look euphoric. What’s wrong with you?”) and that he’d denied but later admitted to himself was fitting. He couldn’t have said where the euphoria came from, exactly, or why he practically floated around the precinct the rest of that day. Clearly Santiago herself had something to do with it, but he’d also thought that maybe after so long under the Vulture, he just missed feeling like he was helping people – and Santiago had reminded him that was still his job. He was still one of the good guys.
But as the days wore on with no further contact from Santiago, and as his good mood hadn’t just faded but reversed itself, he’d had to admit that Santiago herself was the central theme. And it wasn’t just that she wasn’t texting him – he hadn’t seen her byline once in the Bulletin, and he’d been looking every day. Usually three or four times a day. He wondered if she’d quit, or moved. He’d even googled her name, to see if her byline appeared in some other publication, but nothing interesting came up (other than an “Amy Santiago” who was president of the Brooklyn Buttonholers, which was either a knitting club or something much more interesting/alarming and possibly naked).
He didn’t know what to make of her sudden absence, and he didn’t want to take it personally. But it was hard not to when she’d disappeared immediately after they met. Jake hadn’t expected them to become best friends or anything like that, but he’d thought maybe they could be friendly...somethings. He was interested in getting to know more about her, anyway.
“Stop sulking and look at the interview transcript I just sent,” Rosa said.
Jake glowered at her but obediently opened his email. “Which one is this?”
“Second- no, third interview,” Rosa said.
“Bully Mom or No-Sugar Dad?”
“Vegan Dad.”
“Oh!” Jake said, perking up. “He was actually kind of fun.”
“Right?” Rosa said.
By the end of the day, they’d figured out that Vegan Dad, though extremely affable in his witness statement, was also a meth addict and solely responsible for the car break-ins. The Vulture seemed disappointed that they’d cracked the case, probably because he’d bet against them with the captain of the Eight-Four. Jake and Rosa grabbed drinks after work to celebrate both solving the case and pissing off Pembroke.
“So,” Rosa said, after they’d each tossed back a shot and were nursing beers. “What gives with this Santiago thing? Do you like her or something?”
“What? No.” When Rosa just stared, he glared back at her. “Seriously, no.”
“Just seems like you’re pretty caught up in her,” Rosa said with a small shrug.
Jake shook his head and took a long swig of beer. He had to admit that Rosa had a point. And if she’d noticed that he was bothered by what was happening, or rather not happening, with Santiago – well, that wasn’t good.
“I guess I kind of liked texting with her, and now she’s gone MIA and-” He paused, a shiver of distaste racing across his shoulders at what his next words were going to be. Rosa just stared some more, not even blinking. “Fine, I miss her. It. The texts. I liked giving her a hard time.”
“Uh huh,” Rosa said.
Jake rolled his eyes.
“I swear, that’s all there is to it.”
“Look, I don’t care if you like her or don’t like her or just want to fuck her or honestly just like teasing her over text messages – just be careful. I know you trust her-” She held up a hand when Jake started to deny it, kneejerk. “Shut up. Even if she really is a good person, she’s got a job to do and it’s not necessarily compatible with the job we do.”
“Yeah, well, it doesn’t really matter if we’re not talking anymore anyway.” Jake drained the rest of his beer and stood up. “You want another?”
“Sure.”
Jake walked up to the bar and signaled the bartender for two more. While he waited, he took out his phone to check the time. On the locked screen was a new text: “Can you talk?”
Jake quickly looked back over his shoulder at Rosa. She was leaning back in her chair, watching a pair of women playing pool with a smirk on her face.
Jake wrote back: “Not now.”
The bartender set two bottles in front of him and Jake handed over a twenty.
His phone vibrated. “Tomorrow? Can we meet in person? I can buy coffee.”
Jake studied the message, thumbs poised over the keypad. He’d be busy with Rosa most of tomorrow wrapping up the break-in case – they may have solved it, but there were a lot of loose ends that needed tying up, and it would be hard for him to steal away from Rosa without her giving him shit about it.
“Can’t meet during the day,” he wrote. “Dinner?”
He paused before sending. He could suggest they grab a beer, or even that they just meet at the park again. Dinner was a lot. Dinner was date-adjacent.
He hit send.
Her reply was immediate: “7pm. Salty Dog.”
Jake sent her a thumbs up. He made sure to wipe the grin off his face before he brought Rosa her beer.
+++
The Salty Dog was a sports bar-slash-restaurant located in a converted firehouse, therefore, Jake hated it on principle. But he gave Santiago props for picking a spot that was a good 20-minute subway ride from the precinct. He managed to get there five minutes early, but he wasn’t surprised to find her already there, sequestered in a corner table at the back of the restaurant with papers spread all around her. Jake didn’t creep on her from a distance this time, but he still managed to startle her when he walked up and said hello.
“Shit!” She dropped the papers she’d been holding in each hand. “I wasn’t expecting you.”
“You told me to meet you here.”
“No, I know, sorry.” She blew a strand of hair out of her face and began stacking her papers again, in some precise order that seemed to require a fair amount of concentration. She gave Jake a quick, apologetic smile. “Sit down. I just need a second.”
Jake took the seat adjacent to her, so they both had chairs with their backs to a wall. There were a few empty tables in the restaurant, but the place was fairly busy for a Wednesday night with no big sporting events scheduled, as far as Jake knew. He picked up one of the menus that had been left at the edge of the table and scanned through the entrees. On the one hand, the mac and cheese was $13. On the other, the place had a “build your own mac and cheese” bar.
“Okay,” Santiago said, and Jake turned back to her just as she was carefully slipping a thick folder into a messenger bag at her side. “Thanks for coming. I’m sorry I asked to meet in person again, but I needed to show you something.”
“It’s fine,” Jake said. “I think I actually prefer it this way. Texting and phone calls make me nervous. Too much of an electronic trail, you know?”
“I totally get it,” Santiago said. “I actually have an alias for you in my contact list. Just in case.”
“Oh yeah? Me too.” Jake nodded toward her phone, which was sitting on the table next to her menu. “What’s my name?”
Santiago ducked her head, a faint blush coloring her cheeks. Instead of answering, she picked up her phone and opened her contacts, then handed it to him.
“Pineapples?” Jake said. “Wait, is my picture a pineapple wearing a thong?”
“Yes.” Santiago tilted her head to the side to look at the image with him. “I wasn’t wearing my glasses when I found it, but I feel like it works?”
“Somehow, I agree.” Jake handed the phone back to her and said, “Okay, you want to know your name?”
“Yeah I do!”
Jake pulled her up on his contact list and gave her his phone.
“Eldora Senegal,” Jake announced, as Santiago snorted with laughter and slapped a hand over her mouth. “Former prostitute-turned-madame-turned-cupecaketeur, who specializes in children’s birthdays and bachelorette parties. She’s from Latvia.”
“That is very specific,” Santiago said. “But there’s no photo.”
“Yeah, I was so focused on the backstory I guess I didn’t get around to it.”
A waiter came around then, and they both ordered mac and cheese – with bacon, buffalo sauce, and jalapenos for Jake, and shrimp and kale for Santiago – and drafts. After the waiter brought their beers, Jake turned to Santiago and debated whether he should ask what she’d been up to for the past 10 days when she wasn’t texting him or, alternately, not come across as a total loser and just ask why she wanted to meet. It was a tougher call than he cared to admit.
“So, what did you need to show me?”
“Right, yeah,” Santiago said. “First though, I’m sorry I just disappeared. Or, I mean, I’m sure you didn’t even notice that we haven’t communicated in like a week and a half. But if you did- you know what? Never mind.”
She tucked another lock of hair behind her ear. She had the rest of it pulled back into a loose ponytail, wisps breaking free here and there like she’d been messing with it throughout the day. It was endearing. Jake didn’t reply to her rambling, just smiled benignly at her even as he felt a pleasant warmth in his belly.
“I’ve been on a special assignment – the jail story you gave me, actually,” Santiago said. “My editor has me working on it full time, so I haven’t been doing any other cops stories lately.”
Jake felt a swell of relief. “Special assignment. That’s great. Very, um, special.”
“It really is great,” Santiago said, beaming at him. “I mean, it’s crazy stressful and I’m terrified of letting down Holt – he’s the editor in chief. You have no idea what a big deal this is to get to work on an investigation. But it’s amazing. Anyway, today I got a ton of documents from the corrections department in response to my public records request. At first I was surprised that they’d come through so fast – I guess sometimes those requests can take months – but then I realized that they’d purposely dumped, like, every single record on me. They’re trying to overwhelm me with information.”
“Okay,” Jake said slowly, watching as she took out the same folder full of papers she’d been looking at earlier. It was at least two inches thick. “I can see how that’d be a problem, but how can I help?”
“What I need,” Santiago said, “is a system for determining which records are important. This is a sample of the kinds of papers they gave me-”
“Wait, that’s just part of it?” Jake gaped at the massive file.
“Oh my god, yes,” Santiago said. “I have three cardboard boxes filled with papers back in the newsroom.”
“Dear lord.”
“Exactly,” Santiago said. “I was sort of hoping that you could take a look at these papers and help me figure out some key words or codes to focus on. The papers are full of legal jargon and criminal codes, and I can look them up one at a time, but you must know them already.”
“I think you are way overestimating my familiarity with the New York penal code,” Jake said, but he plucked a paper off the top of the stack anyway. “Okay, for starters, you probably want to stick with the felonies. I can help you ID those. And yeah, I can help you put together a list of offenses to look for. How far back do these go?”
“I asked for five years of data,” Santiago said. She’d pulled out a notebook and was already scribbling furiously in it.
“Whoa, right there, you can ditch everything older than a year,” Jake said. “The rumors have only been going around for about six months.”
“Yeah, but this could have been going on for ages before word got out, right?”
“No way,” Jake said. “Cops are huge gossips. I’d guess the longest this has been going on is a year, and that’s stretching it.”
“Okay, that makes the story slightly less compelling but much more manageable, so I guess I’ll take it,” Santiago said with a small frown.
The mac and cheese arrived, and they decided to start going through papers while they ate. Jake scanned them for familiar codes and called out the ones that were most interesting; they both figured that if he didn’t recognize a code then it probably wasn’t common or important.
Santiago explained her plan as they went. A source in the corrections department had told her that only some inmate-lawyer meetings were recorded, and that they tended to be for suspects who were not native English speakers. So after pulling out only the most interesting and potentially damaging cases, Santiago would go through the rest looking for inmates who had requested a translator or a lawyer who spoke another language to represent them.
Jake whistled under his breath as she walked him through the reporting. That sounded like an insane amount of work, made incredibly difficult because she only had access to physical papers, instead of electronic documents that she could quickly search and sort. Santiago scoffed when he said as much.
“Yeah, the cops don’t typically like to make our jobs easier,” she said. Then she looked up, aghast. “I mean, present company excluded, obviously.”
Jake laughed. “It’s okay, a lot of cops don’t like to make my job easier either.”
He turned back to the papers, but looked up again in surprise when Santiago reached out and placed her hand on his arm.
“Seriously, Peralta, thank you,” she said. “I don’t know what I’d do without you.”
Jake glanced at her hand on his arm, and she quickly withdrew it, picking up her fork instead to dig back into her mac and cheese.
“Jake,” he said.
“What?”
“Call me Jake,” he said. “The only people who call me Peralta are cops. And weirdly, sometimes my aunt.”
“Okay, Jake.”
CHAPTER 5
4 notes · View notes
bravonovel · 3 years
Photo
Tumblr media
Cold Showers: https://www.bravonovel.com/cold-showers-7309
Cold Showers novel is a romance story about Jayda Wright and Sebastian Miller, written by Symplyayisha.
To drown away her pain from a harsh breakup, Jayda went to a bar to get wasted. She met Sebastian Miller, The multimillionaire with the worst personality but incredibly sexy. She had a one night stand with him, creating a bond that binds them forever!
Read Cold Showers novel full story online on Bravonovel Website and App.
Read Cold Showers novel chapter 1
Jayda Wright tried to hold back tears as the Board announced her Partner of the most reputable law firm in the United States; Saunders and Co.
It was indeed a well-deserved position for Jayda. She has been aiming for this position since the first time she interned as a paralegal in Saunders and Co. She worked her ass off, gave up everything relating to her social life and put her ALL in her job.
At age 29, she was the youngest and the first female to become a Partner in Saunders and Co.
No doubt being a partner comes with a lot of responsibilities but she was a hard worker so she knew she would survive.
Apart from the responsibilities that came with her promotion, She was now like one of the owners of the firm hence, there would be a great increment in her salary, doubled benefits and most importantly, her name would be engraved on the door of her new office. What a dream come true for Jayda!
"Thank you so much, Mr Tucker, I promise not to disappoint you." She said to the president of the firm who was in his early fifties.
(tall, average weight, with dark hair.)
"You worked for it Jayda so you deserve the position. You hardly lose a case in court and no doubt your wins have contributed to the reputation of this law firm. I wish you all the best in this phase of your career and I hope you don't disappoint us because we all look up to you now." Mr Tucker said.
"You don't have to worry about anything. I will work harder than I've ever worked in this law firm." She promised.
Jayda was congratulated by other partners and senior associates in the conference room. They made a toast and made small conversations in between.
As soon as Jayda was able to escape from the conference room, she went to her office (Aka her old office because she would be moving into her new office on Monday), she reached for her iPhone in her bag and dialled her best friend, Lilian.
"Guess what Lily?" Jayda said excitedly as soon as Lilian picked up her call.
"You just got laid?" Lilian teased which made Jayda roll her eyes.
"What a mood spoiler! Anyways I got promoted."
"OMG!!! As a Partner??????" Lilian asked.
"Yes, babe. Jayda Wright is now a Partner in Saunders and Co."
"Congratulations my love. You work so hard, this is truly well deserved."
"Thank you." Jayda giggled.
"You should go out to celebrate. It's a pity I'm busy tonight. I have to complete the designs for a few dresses. The fashion show is tomorrow."
"Don't worry, we can still hang out tomorrow after your fashion show. I will probably hang out with Zach tonight."
"Please do, and make sure you get laid tonight. No one knows when next you will be free to hang out with us now that you're a partner."
Jayda chuckled, "You have a dirty mind, Lilian. Anyways, I will see you at my place tomorrow evening."
"Alright babe, congratulations once again," Lilian said before she ended the call.
Jayda decided to give her boyfriend, Zach a call to inform him about her promotion and that she will be pulling up at his place soon but he didn't pick up after calling him twice.
She spent the next thirty minutes offloading her drawers and other things she would need in her new office on Monday. After that, she reached for her handbag and laptop bag and made her way out of the building into her car.
Before she started the engine, She called a restaurant to order food and dessert that will be enough for herself and Zach to celebrate.
As soon as Jayda got to her apartment, She called her parents to give them the good news, then took a shower and started preparing to leave for her boyfriend's place.
Jayda was used to dressing professionally because of her line of career but she decided to go a little wild tonight by looking very sexy. She found the perfect dress and matched it with a pair of heels, she reached for her purse which had just her phone, keycard, credit card, and some cash in it. She made her way to the kitchen to grab a bottle of red wine; Zachery's favourite.
After making a stop at the restaurant to pick up the orders she placed, Jayda made her way to Zachery's apartment. It has been a while she came over to his place and suddenly, she started to feel guilty because she doesn't make time for him as she should.
She heaved a sigh, pressed the doorbell and waited for Zach to open up.
"Hey....." Jayda smiled as soon as she came face to face with Zach but the smile on her face slowly faded when she saw the stern look on his face. He looked like he was not happy to see her; like he was busy and needed her to say what she was here for and then leave.
"Why are you here? Don't you have some work to do?" He mocked.
"Look, I'm sorr......" She was saying but he stopped her halfway.
"Why are you here?" He demanded.
"I got promoted as Partner at the firm so I thought we could celebrate. I came with something for us to eat." She gestured to the food bag she was holding.
"I knew you would be partner one day because your job is the most important thing in your life, congratulations!"
"What do you mean?" Jayda sounded hurt.
"Do you know how many dinner dates I've planned which I had to cancel because you had something that came up with work? Or when you eventually showed up, all you did was talk about work, the cases you dealt with and some other random bullshit. You never even talked about us. For heaven's sake, Jayda, you're my girlfriend and it's not even like you are."
"Maybe we are not meant to be together so I think it's time we go our separate ways."
"Please Zach, Don't break up with me. I promise I will change." Jayda pleaded, trying to hold back tears.
"You were not even a partner and you didn't have time for me. What do you think will happen now that you're a partner?"
"We are both workaholics, I have a family business and chain of hotels that I run but I still create time for us to be together. I want to start a family Jayda and clearly, you are not ready for that, you're not ready to settle down and I'm ready."
"To you, your Job comes first, you come second, your best friend comes third and I have no place in your life."
Jayda opened her mouth to say something but couldn't come up with any reasonable excuse because all that he said was true.
"We never worked, Jayda and I can't continue this way. Let us go our separate ways and I wish you all the best in this new phase of your career."
Jayda was about to plead with him but stopped when a lady came to join Zach at the entrance.
"It's because of her you're breaking up with me?" Jayda asked Zach as she took in the lady's appearance.
She was a little bit taller than Jayda and if possible, prettier. Jayda swallowed painfully in shame.
Zach wrapped his arms around the girl's waist. "She has nothing to do with our relationship. I've been wanting to cut it off for a while but I never got the chance to see you to have a proper conversation with you because of how busy you are."
"I respect you so much that cheating on you is the last thing I will ever think of doing. I met Adriana a month ago and we are getting to know each other. We have a lot in common and she's ready to start a family with me."
"I wish you all the best in your career, Jayda. I've moved on and I hope you do too."
Zach shut the door on her and immediately, the hot tears she was holding rolled down her cheeks. She left the food and wine she brought by his entrance and made her way back to her car.
As soon as Jayda's head hit the headrest of her car, she sobbed uncontrollably.
She liked Zach, he was handsome, rich, successful, caring and humble but now she lost him because she never created time for him.
She didn't know chasing her dreams would cost her her relationship with Zach. Lilian, her best friend, had advised her on several occasions to create time for Zach but she turned deaf ears and now she lost him.
Truthfully, he has been there for her more than she has been there for him. She cancelled 96% of their dates because of work-related reasons. They hardly talked about themselves since they made their relationship official about a year and six months ago. They could even go for a month without talking to each other. That was the extent to which their relationship sucked.
After having a good cry in her car, Jayda started the engine and drove straight to the latest bar in town which was considered to be the most expensive. It was specifically made for high-class people.
Without caring if she had stains of dried tears on her face, she walked elegantly into the bar, her head high, her clutch in her hands and with the intention of getting drunk.
She made herself comfortable on a stool and told the bartender to mix her all the strong drinks they have. She had more than enough cash in her purse to pay for everything.
Jayda has never been a fan of alcohol. She could count the few times she had taken strong alcoholic drinks and neither had she been to a club before. No matter how her best friend, Lilian, threatens her to attend one with her, she always came up with the perfect excuse not to go.
But who cares tonight, she was here to have fun by herself, celebrate her promotion and also her breakup.
Jayda had the most horrible look on her face when she took the first shot but she got comfortable with the taste by the time she took her third shot.
......................
After a very long day at work, having one meeting to the other and reviewing contracts with his lawyer, Sebastian Miller walked into Club 232. The most popular and expensive club in Miami.
Everyone who works in the club knew him as a regular VIP customer. He showed up on Tuesdays, Wednesdays and Fridays to have some drinks and find a girl to fuck.
Sebastian is cold, ruthless and heartless. He has absolutely no respect for anyone, especially the female figure. He doesn't believe in love and neither does he believe in anything called passion or emotion. Let's just say he lives a life of contract rather than affection.
The only people Sebastian Miller has respect for and cares about are his parents, twin sisters, his best friend, Caleb and other close members of his family.
Despite his annoying behaviour, Sebastian was handsome as hell and extremely rich which is why girls are always honoured to share his bed with him even if it was just for a night.
……
Continue to read the chapter 1 of Cold Showers novel online: https://www.bravonovel.com/cold-showers-7309/chapter-1-54482
Read more HOT romance stories on Bravonovel App.
0 notes
t-baba · 6 years
Photo
Tumblr media
How to Create and Verify JWTs with Node
This article was originally published on the Okta developer blog. Thank you for supporting the partners who make SitePoint possible.
Authentication on the internet has evolved quite a bit over the years. There are many ways to do it, but what worked well enough in the 90s doesn’t quite cut it today. In this tutorial, I’ll briefly cover some older, simpler forms of authentication, then show you how a more modern and more secure approach. By the end of this post, you’ll be able to create and verify JWTs yourself in Node. I’ll also show you how you can leverage Okta to do it all for you behind the scenes.
Traditionally, the simplest way to do authorization is with a username and password. This is called Basic Authorization and is done by just sending username:password as an encoded string that can be decoded by anybody looking. You could think of that string as a “token”. The problem is, you’re sending your password with every request. You could also send your username and password a single time, and let the server create a session ID for you. The client would then send that ID along with every request instead of a username and password. This method works as well, but it can be a hassle for the client to store and maintain sessions, especially for large sets of users.
The third method for managing authorization is via JSON Web Tokens, or JWTs. JWTs have become the de facto standard over the last few years. A JWT makes a set of claims, (e.g. “I’m Abe Froman, the Sausage King of Chicago”) that can be verified. Like Basic Authorization, the claims can be read by anybody. Unlike Basic Auth, however, you wouldn’t be sharing your password with anyone listening in. Instead, it’s all about trust.
Trust, but Verify… Your JWTs
OK, maybe don’t believe everything you read on the internet. You might be wondering how someone can just make some claims and expect the server to believe them. When you make a claim using a JWT, it’s signed off by a server that has a secret key. The server reading the key can easily verify that the claim is valid, even without knowing the secret that was used. However, it would be nearly impossible for someone to modify the claims and make sure the signature was valid without having access to that secret key.
Why Use a JWT?
Using a JWT allows a server to offload authentication to a 3rd party they trust. As long as you trust the 3rd party, you can let them ensure that the user is who they say they are. That 3rd party will then create a JWT to be passed to your server, with whatever information is necessary. Typically this includes at least the user’s user id (standardly referred to as sub for “subject”), the “issuer” (iss) of the token, and the “expiration time” (exp). There are quite a few standardized claims, but you can really put any JSON you want in a claim. Just remember the more info you include, the longer the token will be.
Build a Simple Node App
To create and verify your own JWTs, you’ll first need to set up a Node server (well, you don’t have to, but that’s what I’ll be teaching you today). To get started, run the following commands to set up a new project:
mkdir fun-with-jwts cd fun-with-jwts npm init -y npm install [email protected] npm install -D [email protected]
Next, create a new file index.js that will contain a super simple node server. There are three endpoints in here, that are just stubbed with TODOs as notes for what to implement.
The /create endpoint will require basic authorization to log you in. If you were writing a real OAuth server, you would probably use something other than Basic Auth. You would also need to look up the user in a database and make sure they provided the right password. To keep things simple for the demo, I’ve just hard-coded a single username and password here, so we can focus on the JWT functionality.
The /verify endpoint takes a JWT as a parameter to be decoded.
const express = require('express') const app = express() const port = process.env.PORT || 3000 app.get('/create', (req, res) => { if (req.headers.authorization !== 'Basic QXp1cmVEaWFtb25kOmh1bnRlcjI=') { res.set('WWW-Authenticate', 'Basic realm="401"') res.status(401).send('Try user: AzureDiamond, password: hunter2') return } res.send('TODO: create a JWT') }) app.get('/verify/:token', (req, res) => { res.send(`TODO: verify this JWT: ${req.params.token}`) }) app.get('/', (req, res) => res.send('TODO: use Okta for auth')) app.listen(port, () => console.log(`JWT server listening on port ${port}!`))
You can now run the server by typing node_modules/.bin/nodemon .. This will start a server on port 3000 and will restart automatically as you make changes to your source code. You can access it by going to http://localhost:3000 in your browser. To hit the different endpoints, you’ll need to change the URL to http://localhost:3000/create or http://localhost:3000/verify/asdf. If you prefer to work in the command line, you can use curl to hit all those endpoints:
$ curl localhost:3000 TODO: use Okta for auth $ curl localhost:3000/create Try user: AzureDiamond, password: hunter2 $ curl AzureDiamond:hunter2@localhost:3000/create TODO: create a JWT $ curl localhost:3000/verify/asdf TODO: verify this JWT: asdf
Create JSON Web Tokens in Your Node App
A JSON Web Token has three parts. The header, the payload, and the signature, separated by .s.
The header is a base64 encoded JSON object specifying which algorithm to use and the type of the token.
The payload is also a base64 encoded JSON object containing pretty much anything you want. Typically it will at least contain an expiration timestamp and some identifying information.
The signature hashes the header, the payload, and a secret key together using the algorithm specified in the header.
There are a number of tools out there to create JWTs for various languages. For Node, one simple one is njwt. To add it to your project, run
npm install [email protected]
Now replace the res.send('TODO: create a JWT') line in index.js with the following:
const jwt = require('njwt') const claims = { iss: 'fun-with-jwts', sub: 'AzureDiamond' } const token = jwt.create(claims, 'top-secret-phrase') token.setExpiration(new Date().getTime() + 60*1000) res.send(token.compact())
Feel free to mess around with the payload. With the setExpiration() function above, the token will expire in one minute, which will let you see what happens when it expires, without having to wait too long.
To test this out and get a token, log in via the /create endpoint. Again, you can go to your browser at http://localhost:3000/create, or use curl:
$ curl AzureDiamond:hunter2@localhost:3000/create eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJoZWxsbyI6IndvcmxkISIsIm51bWJlciI6MC41MzgyNzE0MTk3Nzg5NDc4LCJpYXQiOjE1NDIxMDQ0NDgsImV4cCI6MTU0MjEwNDUwOCwiaXNzIjoiZnVuLXdpdGgtand0cyIsInN1YiI6IkF6dXJlRGlhbW9uZCJ9.LRVmeIzAYk5WbDoKfSTYwPx5iW0omuB76Qud-xR8We4
Verify JSON Web Tokens in Your Node App
Well, that looks a bit like gibberish. You can see there are two .s in the JWT, separating the header, payload, and signature, but it’s not human readable. The next step is to write something to decode that string into something that makes a little more legible.
Replace the line containing TODO: verify this JWT with the following:
const jwt = require('njwt') const { token } = req.params jwt.verify(token, 'top-secret-phrase', (err, verifiedJwt) => { if(err){ res.send(err.message) }else{ res.send(verifiedJwt) } })
In the route /verify/:token, the :token part tells express that you want to read that section of the URL in as a param, so you can get it on req.params.token. You can then use njwt to try to verify the token. If it fails, that could mean a number of things, like the token was malformed or it has expired.
Back on your website, or in curl, create another token using http://localhost:3000/create. Then copy and paste that into the URL so you have http://localhost:3000/verify/eyJhb...R8We4. You should get something like the following:
{ "header": { "typ": "JWT", "alg": "HS256" }, "body": { "iss": "fun-with-jwts", "sub": "AzureDiamond", "jti": "3668a38b-d25d-47ee-8da2-19a36d51e3da", "iat": 1542146783, "exp": 1542146843 } }
If you wait a minute and try again, you’ll instead get jwt expired.
Add OIDC Middleware to Your Node App to Handle JWT Functionality
Well, that wasn’t so bad. But I sure glossed over a lot of details. That top-secret-phrase isn’t really very top secret. How do you make sure you have a secure one and it’s not easy to find? What about all the other JWT options? How do you actually store that in a browser? What’s the optimal expiration time for a token?
This is where Okta comes in to play. Rather than dealing with all this yourself, you can leverage Okta’s cloud service to handle it all for you. After a couple minutes of setup, you can stop thinking about how to make your app secure and just focus on what makes it unique.
Why Auth with Okta?
Okta is a cloud service that allows developers to create, edit, and securely store user accounts and user account data, and connect them with one or multiple applications. Our API enables you to:
Authenticate and authorize your users
Store data about your users
Perform password-based and social login
Secure your application with multi-factor authentication
And much more! Check out our product documentation
If you don’t already have one, sign up for a forever-free developer account.
Create an Okta Server
You’re going to need to save some information to use in your app. Create a new file named .env. In it, enter your Okta organization URL.
The post How to Create and Verify JWTs with Node appeared first on SitePoint.
by Braden Kelley via SitePoint https://ift.tt/2EeMxki
0 notes