teleren/devto huggingface dataset:
Running Basic Security Tests Against Twitter API
Tags: security, api, tutorial, testing
Published: 2022-05-10 21:13:21

I tweet once in a while about product/organization updates. I've built a couple of Twitter integrations in the past. 

As part of security research, I look for vulnerabilities in public APIs and mobile/web backend APIs. I often use the free API security testing tool to run basic tests. These tests are safe and non-intrusive; they detect OAuth 2.0/JWT/Authentication flaws in APIs. Twitter and similar organizations wouldn't mind or see these tests.
https://apisec-inc.github.io/pentest/

I used this Twitter API OpenAPI Specification file URL for testing:
https://api.twitter.com/labs/2/openapi.json

Here is the simple process I followed. I pointed the tool to the Twitter OpenAPI Spec file and just ran the basic tests to see what it returns.
The result came back with one endpoint being open to the public. Upon further investigation, I realized the endpoint was returning the API scheme, so it wasn't a big deal. 


![Security Report](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dlgpxt0lhq0do7mxcd21.png)

![Vulnerabilities](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pvujmdvazo300qew1ezx.png)

Conclusion: All Twitter API endpoints are secure, and no issues were found.
VR Mock Coding Interview - Nearly Sorted Array - Fail
Tags: programming, codenewbie, tutorial, help
Published: 2022-05-10 21:11:41

Check out a VR Mock Coding Interview [HERE](https://www.youtube.com/watch?v=668gKixvLgg&t=1710s) and see below for a breakdown. Watching other mock interviews is a good way to familiarize yourself with technical interviews. If you are looking for mock interviews, feel free to join [our discord](https://discord.gg/VQkMr234zk) and I can match you with someone within 24 hours!

Overall: 3/5
Breakdown

- Coding - 4
- Communication - 4
- Problem Solving - 2
- Inspection - 2
- Review - 3

What they did well

- Started asking clarifying questions
- Wrote out his inputs
- Asked clarifying questions about K
- Wrote out an example
- Had good intuition around using K to only look at sub arrays
- Thoughts all made sense and was easy to follow along
- Able to get to a runtime of O(NK)
- Able to confidently speak about his code
- Able to intelligently code
- Worked through your example, you can do this more explicitly
- Questions were good.

What could be better

- Missed the nearly sorted requirement
- Asks am I on the right track?
- Didn’t mention a simple brute force solution
- Got quite when thinking through solutions
- Needed a hint to get to thinking about it correctly
- Hint: Needed a hint to think about what would go in the first position
- Didnt register the hint well
- Quietly thinking
- Spending too much time on thinking
- Had issue identifying that he needed the min even after hint
- “do you want me to code it” without defining runtime, without defining space and
- Never mentioned space time
- Specifed an incorrect runtime, multiply times, First said N, then said N^2. Lack of confidence when speaking about runtime.
- DIdnt know the runtime of mergesort
- **Frustrated gasp** (Never do this)
- Hint: **How can you quickly find the smallest element of the subset**
- Wasn’t grasping a heap, or the ideas around it
- Got quiet when coding
- Keep getting quiet even when asking
- Got lost in his own code for a few seconds
- No way I could read the code

## Other Mock Interview Resoures:

[How to get value out of your mock interviews](https://fangprep.substack.com/p/how-to-prepare-for-a-mock-interview?s=w)

[Why mock coding interviews are important](https://fangprep.substack.com/p/why-mock-coding-interviews-are-important?s=w)

## Join the Community

Hackpack is the most hyperactive community of engineers studying for programming interviews. [Apply today](notion://www.notion.so/hackpack/Hackpack.io)

[Interview Tips Newsletter](https://fangprep.substack.com/)
til: Generate a file with specific size in java
Tags: java, junit, nio
Published: 2022-05-10 20:53:09

Recently I wanted to implement a new feature in our codebase, that dealt with uploading a file via a simple upload or a multi-part upload to an AWS S3 storage. It was actually a fun feature to develop, I learned a lot about AWS SDK on [uploading an object using multipart upload](https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpu-upload-object.html) and using [presign urls](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html) which can be extremely useful to delegate the upload responsibility (and the dedicated resources) to the client apps.

Testing this feature required the creation of dummy tests files with specific size in order to trigger (or not) the multi-part upload:

- Committing dummy files to our git repository was a definite no-no.
- Files should be thrown away after running the tests.
- Files creation should as fast as possible.
- The actual content of the file is not important.

First two requirements can be answered using Junit 5's [TempDirectory extension](https://junit.org/junit5/docs/current/user-guide/#writing-tests-built-in-extensions-TempDirectory)[^1]

The other requirements could be met with sparse files:

> Sparse files are files stored in a file system where consecutive data blocks consisting of all zero-bytes (null-bytes) are compressed to nothing. There is often no reason to store lots of empty data, so the file system just records how long the sequence of empty data is instead of writing it out on the storage media. This optimization can save significant amounts of storage space for other purposes.
> 
> [source](https://www.ctrl.blog/entry/sparse-files.html)

The following code generate a sparse file, open the file for writing, seeks a given position and adds somes bytes at the end. It leverages the `FileChannel` class.

```java
@Test
void example(@TempDir Path tempFolder) throws IOException {
    // The sparse option is only taken into account if the underlying filesystem
    // supports it
    final OpenOption[] options = {
            StandardOpenOption.WRITE, 
            StandardOpenOption.CREATE_NEW , 
            StandardOpenOption.SPARSE };
    
    final Path hugeFile = tempFolder.resolve("hugefile.txt");

    try (final SeekableByteChannel channel = Files.newByteChannel(hugeFile, options)) {
        // or any other size
        long giB = 1024L * 1014L * 1024L;
        channel.position(giB);

        // Write some random bytes
        final ByteBuffer buf = ByteBuffer.allocate(4).putInt(2);
        buf.rewind();
        channel.write(buf);
    }

    //Do something with my dummy file
}
```

Since we don't need to actually allocate disk space, large sparse files can be created in a relative short time, making a good fit
for quick "unit" testing.

### Additional Resources:

- https://www.baeldung.com/junit-5-temporary-directory
- https://en.wikipedia.org/wiki/Sparse_file

[^1]: This feature is still experimental
Hello World!
Tags: programming, beginners, webdev, journey
Published: 2022-05-10 20:49:04


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sw7qlp6gq037sqz79lno.jpg)
“Hello World”... These are the two words that most of us developers used when we started our journey into development and programming in general. 

I spent nearly 6 years of coding as a hobby, I used to learn through watching some tutorial via YouTube, reading some articles and so on, and even though I am thankful for every person that had helped me learn programming in general, I couldn’t help but noticed that after that I passed that first learning curve, there was always something missing. 

That is why I decided on making some tutorials on my blog, and soon starting a YouTube video to follow after it, the purpose of this journey is to help everyone to get started on web development with a solid base and they will be capable of creating anything they want with that, but before that, I just want to point on somethings that are very important!

Computer programming in general in a vast field and it is expanding as you are reading this, but don’t worry, I don’t mean to scare or discourage you, I simply want to tell you the truth that could be either exiting for some people, or will have an opposite effect towards others. Through this journey I will be posting how to start your journey of web development from scratch and I will guide you towards a better mastery of web development by also building some web applications in the process. And so, I will encourage you to keep on reading and checking out my content as it will be updated regularly, so stay tuned!  

> Knowledge is power. Francis Bacon
No more typos in the code ✍️
Tags: vscode, vscodeextension, spelling
Published: 2022-05-10 20:09:58

**[Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) is a handy VSCode extension. It highlights typos in the code, e.g. in the names of your classes or methods, or even in the code comments. You can quickly fix the typo based on the suggestions or add a custom word to the user or workspace dictionary.**

![Example of spell checking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p0i5fk81xekyim5l6nxf.png)
 
### Avoid typos in Public API of your library
It's important to avoid typos, especially in the public API of libraries that you author. Nobody enjoys using misspelled API. Moreover, you don't want the hassle of introducing a breaking change just to fix a misspelled method's name - library users are not fond of breaking changes.
To Some Creativity and to Others ...
Tags: writing, productivity
Published: 2022-05-10 20:09:23

Once in a while I find myself having an idea. Typically, this is something along the line of either a mobile, desktop, or web application. In such situations of conceiving an idea, I believe, self-awareness is an important skill to have. Realizing one's strength helps one to avoid wasting time on things that may drain the hype created by the Eureka moment.

> Strike while the iron is hot. - Old Proverb

Timing, perfect execution, and passion will always in my view produce the best results. Having a design that speaks to one's idea is one way of taking advantage of the momentum at conception. The design can take the form of UI, functional block diagrams or flowcharts, anything that allows you to present ideas to potential clients or your team. However, an area like UI design is not my strong suit. So how do I manage to still come up with something presentable? Something that requires not mentioning every now and then during a presentation that the design is in a premature state? Well, with the help of a few handy tips and tools.

### Be Inspired
Imitation is one form of learning, I learned this in an Expressive Arts class during my Primary School. There are so many great designs out there that you can get ideas from to create your designs. If a base design is hard to create, the various mockups available can give a sense of direction. I recommend making a sketch or wireframe layout just to kill some noise. Designs are mazes you can easily get lost in.
* [Dribbble](https://dribbble.com/), my personal go-to-site.
* [Uplabs](https://uplabs.com)

### What tools can you use?
We live in fortunate times where tools are surplus that can aid in arriving at the same outcome. Other tools automate the entire process and others require more input from the user, trade-offs are inevitable. Whatever your preferences are, chances are there is something on the market for you. The tools listed here are just the bare tip of the iceberg. There are free and/or freemium offers with respect to each of these tools.

* Adobe XD
* Adobe Express
* Canva
* [Diagrams.net](https://www.diagrams.net/), formerly draw.io
* [GIMP](https://www.gimp.org/), the Photoshop alternative.

> To some He gave abundant creativity and others like me the ability to know when something is at least presentable. So I look for that.

Hope you enjoyed this read and got something out of it. Would love to hear from you about the various tools you use.

Stay Productive!!!
Getting stated with the Developer Portal
Tags: webmethods, apimanagement, developerportal
Published: 2022-05-23 09:54:19

---
title: Getting stated with the Developer Portal
published: true
date: 2022-05-10 20:08:46 UTC
tags: webMethods, APIManagement, DeveloperPortal
canonical_url: https://tech.forums.softwareag.com/t/getting-stated-with-the-developer-portal/257336
---

[![b9ff942b-a2ee-4f29-ade7-134bc2fb41cd](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/4/b/4b0c566c90c27a45fb1d9df5ae2ac6e9dd5acacf_2_690x388.jpeg)](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/b/4b0c566c90c27a45fb1d9df5ae2ac6e9dd5acacf.jpeg "b9ff942b-a2ee-4f29-ade7-134bc2fb41cd")

We recently released the Developer Portal for general availability. It is a revamped and rearchitected version of the API Portal. This evolution enables easy and seamless customization, integration, and extension capabilities in a compact and pluggable package. If you would like to learn more about it, check out [my earlier blog post](https://blog.softwareag.com/developer-portal) on its release.

One of the great things about the Developer Portal is that you are not required to use webMethods API Gateway to publish your APIs from; you can share any API on it where ever they are deployed. In fact, you don’t even need to be a Software AG customer to try it out. Check out how you can get started on our [GitHub page](https://github.com/SoftwareAG/webmethods-developer-portal). While you are there, make sure to check out [the samples folder](https://github.com/SoftwareAG/webmethods-developer-portal/tree/main/samples) to see the web components for embedding Twitter feeds, YouTube videos, Google Analytics in it; and the various themes we have created to see the endless possibilities of customization.


[Visit the original post](https://tech.forums.softwareag.com/t/getting-stated-with-the-developer-portal/257336)
Powershell GUID Generator
Tags: powershell, guid, terminal, programming
Published: 2022-05-10 19:56:18

I've built a simple GUID generator that generates GUID and puts it into the clipboard!

You can download the file from my repository: [guid.ps1](https://github.com/senad-meskin/powerscripts/blob/master/guid.ps1)

You can read more info at the [Git Hub Page](https://github.com/senad-meskin/powerscripts#guid-generator)

### Details
In PowerShell you can generate GUIDby typing `[Guid]::NewGuid()` into your PS terminal, but then you would need to copy it from the terminal and paste it where you need it. It was complex for me so I've built a script that does all the for you.

```PowerShell
$guid = [guid]::NewGuid().ToString();

Set-Clipboard -Value $guid;

Write-Host 'Guid:' $guid 'copied to the clipboard!';
```

### In use
```cmd
E:\ps> guid
Guid: d5bae5bc-d0dc-47ef-bbf7-1323f7a2180e copied to the clipboard!
E:\ps>
```

__NOTE__: Just be sure to put the `guid.ps1` file somewhere where your path is defined so you can access it from anywhere.
How to Generate a Resume from GitHub
Tags: resume, github, tutorial
Published: 2022-05-11 12:22:07

---
title: How to Generate a Resume from GitHub
published: true
cover_image: "https://blog.eamonncottrell.com/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1652211371236%2FsSPRkOKAi.jpg%3Fw%3D1600%26h%3D840%26fit%3Dcrop%26crop%3Dentropy%26auto%3Dcompress%2Cformat%26format%3Dwebp&w=3840&q=75"
date: 2022-05-10 19:36:57 UTC
tags: resume,github,tutorial
canonical_url: https://blog.eamonncottrell.com/how-to-generate-a-resume-from-github
---

## Solution

Stop sweating a project resume. [This tool](https://github.com/resume/resume.github.com) automatically organizes your GitHub projects into a tight, shareable PDF.

> A service that creates a rsum based on your GitHub repos/activity.
> 
> <cite>from GitHub Resume README</cite>

[https://media.giphy.com/media/6KRJb6JWCffc9Ys312/giphy.gif](https://media.giphy.com/media/6KRJb6JWCffc9Ys312/giphy.gif)

## Problem

Why use this? Resumes are terrible for everyone, and a pain to write. This will not replace a comprehensive resume, but it could be used to quickly generate a project-based list of your body of work on GitHub to easily share with a hiring manager before interviewing.

## How to Use

I came across this from a post on LinkedIn yesterday, and was impressed at the simplicity and genius of the project.

1. Star the [repository](https://github.com/resume/resume.github.com)
2. Your resume will be viewable at: `https://resume.github.io/?yourusername`

That's it. It took [mine](https://resume.github.io/?sieis) a few minutes to become available after starring.

![sieis-github-resume](https://cdn.hashnode.com/res/hashnode/image/upload/v1652209799798/jFFqdlBVy.png)

## Not Perfect

Of course, this isn't perfect. There's zero control over how it looks and what is listed. But it's not supposed to replace a well documented, concise resume. This is fantastic for organizing your otherwise chaotic GitHub projects.

## Hope that's helpful 👋

I thought this was very cool, and I hope you find use for it. Share it with others!

Come say hey to me over on [Twitter](https://twitter.com/EamonnCottrell), and I hope you have a great one!
VS Code Appwrite Snippets Extension🚀✨
Tags: appwritehack, flutter, webdev
Published: 2022-05-10 19:28:28

### Overview of Our Submission

It is obvious that Appwrite official documentation is super comprehensive, but busy developers don't need to always revisit the website to copy&paste the code when going to use a certain endpoint! So, we i.e **DuoDevs** created a cool VS Code extension which will generate the code as it is in the documentation🥳

**E.g** `aa` will do `let user = await sdk.account.create('${1: USER_ID}', '${2: USER_EMAIL}','${3: USER_PASSWORD}');`

![Demo gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lznmgrk365mlcq4nffem.gif)

We were highly inspired by a vs code extension called "ES7+ React/Redux/React-Native snippets" which generate snippets for React/Redux and react-native. 

It is live [here](https://marketplace.visualstudio.com/items?itemName=DuoDevs.appwrite-snippets)

### Submission Category: 
Wacky Wildcards

### Link to Code 
 {% embed https://github.com/gasaroleila/appwrite-snippets %}

### Additional Resources / Info

I worked with {% embed https://dev.to/gasaroleila %}

Thank You for reading! 
Happy Coding :)
HOSTGATOR
Tags: webdev, beginners, programming
Published: 2022-05-10 19:28:09

HostGator makes unlimited web hosting easy and affordable with unlimited disk space and bandwidth and an easy control panel. Low prices and easy setup makes HostGator one of the leading web hosting firms in the industry!

[**Click here to get the best offers of HostGator.**](https://yazing.com/deals/hostgator/Aliahmed8880)

HostGator offers many web hosting plans that are well-suited for its purpose with affordable prices. It offers free SSL certificates as well as fast and secure servers. Moreover, it is guaranteed that your site stays up 99.9% of the time. You can start as low as $2.75/mo*, and you will get a free domain for a whole year!

[**Check the best deals and discounts of HostGator at this link.**](https://yazing.com/deals/hostgator/Aliahmed8880)
How to Run Python Code in Your Flutter App with pyFlut
Tags: flutter, python, beginners, tooling
Published: 2022-05-10 19:03:33

Hey developers 👋 for the past month, I've been working on a package in which we can write python code inside flutter applications. Currently, it supports pure python packages. This opens new possibilities as now we can use already written modules of python in flutter apps. Later I am also going to add support for libraries with c components like NumPy, TensorFlow, matplotlib etc. You can check the demo in this youtube video and if you are interested then make sure to subscribe to my youtube channel so that you'll get all the updates regarding this package. b-bye!!

{% youtube dclomnbdChg %}

## Subscribe For More

[![YouTube](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvjpg9zn6xfcdkfxhl0x.png)](https://www.youtube.com/channel/UCLO_mjF4nvD4wYnTYRlYXsA?sub_confirmation=1)

## Contact Me

Website: [yashmakan.co.in](http://yashmakan.co.in)

Twitter: [@Yash_Makan](https://twitter.com/Yash_Makan)

## Contribute

buymeacoffee: [@Here](https://www.buymeacoffee.com/yashmakan) 

## Other Interesting Articles

- [Whatsapp Clone for Android & IOS using Flutter & Python - Part 2 (Complete Tutorial)](https://dev.to/yash_makan/whatsapp-clone-for-android-ios-using-flutter-python-part-2-complete-tutorial-554k)
- [Whatsapp Clone for Android & IOS using Flutter & Python - Part 1 (Complete Tutorial)](https://dev.to/yash_makan/whatsapp-clone-for-android-ios-using-flutter-python-part-1-complete-tutorial-4in1)
- [21 must-read books for kids, beginner, advanced & interview with PDF 🐍](https://dev.to/yash_makan/21-must-read-books-for-kids-begineer-advanced-interview-with-pdf-56c7)
- [Improve your workflow using Automation in Python](https://dev.to/yash_makan/everything-about-automation-in-python-pc-mobile-web-raspberry-pi-4cgh)
- [4 ways to create modern GUI in python in the easiest way possible](https://dev.to/yash_makan/4-ways-to-create-modern-gui-in-python-in-easiest-way-possible-5e0e)
- [4 Free hosting platforms for python web app with step-by-step process](https://dev.to/yash_makan/4-best-python-web-app-hosting-services-for-freewith-complete-process-57nb)
- [18 Python one-liners that will speed up your coding process.](https://dev.to/yash_makan/18-python-one-liners-that-will-speed-up-your-coding-process-21md)
- [AI bot that could answer your questions](https://dev.to/yash_makan/ai-bot-that-could-answer-any-questions-asked-gmn)
- [Generate your own favourite TV episode using python](https://dev.to/yash_makan/generate-your-own-favourite-tv-episode-using-python-1pb3)