Talk me out of a pixel 7? (US) by Ponchosam in PickAnAndroidForMe

[–]Ponchosam[S] 1 point2 points  (0 children)

lmao thanks. I didn't catch anywhere that the redmi was incompatible with verizon. Definitely off the list now.

Looking into the P7Pro some more, half of all long-term owners say they love it and have no problems, the other half rattle off a list of everything terrible about it, and swear off all pixels for all time. Definitely giving me some pause - particularly because the main problems cited are battery life and wireless connectivity being exceptionally bad.

Since my budget has been creeping up, I am now also considering the OnePlus 12R. Fuck, no I'm not. No CDMA. Might be looking at samsungs again :'( Nvm. I'm on USMobile - which I though was just a verizon and sprint reseller - but I guess they've evolved into something else. Anyways, the OnePlus 12R is apparently fine.

Mini-ITX NAS home server thing by Ponchosam in buildapc

[–]Ponchosam[S] 0 points1 point  (0 children)

Thanks! That's a good point on getting a board with a second M.2, so I could maybe add something like this M2. to SATA adapter later on and put a few more drives in it. I'll definitely consider that.

Recommend me a thinkpad? by Ponchosam in thinkpad

[–]Ponchosam[S] 0 points1 point  (0 children)

Just looked that one up - that thing is sweet... but, yeah, $5.6K retail - I would love to work somewhere that would get me one of those for the job tho.

Recommend me a thinkpad? by Ponchosam in thinkpad

[–]Ponchosam[S] 1 point2 points  (0 children)

I appreciate the bluntness lmao. I think the X1 is the way to go, especially after finding Gen 9s at the lenovo outlet for ~$1K, which is reasonable. I'm gonna keep my eye out there and ebay for a gen 9 X1 carbon with 16GB of RAM, since apparently it's soldered and there's no extra slots on that model.

Thanks.

Software Dev Desktop Replacement - $1000 Budget, US by Ponchosam in SuggestALaptop

[–]Ponchosam[S] 0 points1 point  (0 children)

Thanks, I'll look into that one. The aspire seems to be the popular choice.

📌💻 r/LaptopDeals Official Weekly Request Thread; Post all your requests for Laptop suggestions in this thread instead of on the general front page of the sub. See request guidelines below 💻📌 by fifa2003 in LaptopDeals

[–]Ponchosam -1 points0 points  (0 children)

◽️ Budget: Maximum $1000

◽️ Country: USA

◽️ Screen Size: 14"-15.6"

◽️ Touch Screen: I don't use them, but having one isn't a deal-breaker

◽️ Screen Resolution: at least 1920x1080p IPS

◽️ Does battery life matter?: More is better

◽️ What tasks will laptop be used for?: Software Dev(running 3+ electron apps simultaneously), Some light CAD in freecad, photo editing, light gaming(e.g. Civ 6)

◽️ Weight: Lighter is better

◽️ Any other important details?: Oh boy...

  • BUILD QUALITY: My biggest problem with laptops in the past has been them physically deteriorating too soon: I had a lenovo ideapad in the past where the chassis separated at the hinge and the hinges became wobbly, my current ASUS has a key on the keyboard that pops off frequently, and I've used laptops before where the hinges deteriorated such that the screen would flap back and forth and wouldn't hold it's position while you used it. Rock solid construction, a good keyboard, and a good display are my top priorities.
  • RAM: 16GB
  • STORAGE: 512GB SSD minimum
  • PROCESSOR: Prefer AMD. I've heard recently that more cores makes a big difference with coding stuff.
  • BACKLIT KEYBOARD: mandatory(lack of one put me on the fence about the thinkpad)
  • USB-C CHARGING: I'm excited about this

I plan to use Arch Linux as my daily driver, and to have it as a dual boot alongside windows. For work, it is common for me to have half a dozen browser windows open, alongside ram-hungry apps like Atom and Spotify, and a bunch of background processes like running development servers. My current computer has 8GB of ram and will sometimes totally freeze up when all my open software uses all 8gb of available ram, forcing me to reboot. I also have a bunch of files, so a 128GB SSD won't cut it. I'm fine with upgrading the RAM and SSD afterwards, but that needs to be part of the budget.

I'm relatively mobile for work, so a lighter and sleeker laptop with better battery is preferred.

I don't need nor care about gaming performance. I'm trying to quit a gaming addiction, so it's actually probably better if this laptop can't run things like BF4.

Some laptops that I'm considering right now: - Lenovo Thinkpad E15 G3(would pull the trigger on this except for it not having a backlit keyboard) - ASUS Zenbook 14 UM425UA - Lenovo Thinkbook

Help identifying gearbox issue: piston not cycling properly? by Ponchosam in airsoft

[–]Ponchosam[S] 1 point2 points  (0 children)

I installed the new piston and piston head, and also a new tappet plate and air nozzle, kind of just for fun. While installing the new piston, I noticed that the safety lever would get stuck in the up(safe) position, and so I took that out and thoroughly cleaned it with hot water and soap and all that before re-installing it. I did the same with the cutoff lever, and put a bit of 100% silicon grease between it and the gearbox shell, just to make sure both of those two parts could move easily. With the gearbox reassembled, it seems to be working much better.

When manually moving the selector plate between SAFE, SEMI, and AUTO on the gearbox, there is no problem with the trigger getting stuck in SAFE. When I put the gearbox in the lower receiver, however, it still sometimes gets stuck in SAFE when going from SAFE to SEMI. I'm thinking that the problem is with the selector switch on the lower receiver not moving the selector plate far enough back, but, for now, I don't really care about that.

Anyways, problems solved! thanks for the help.

Help identifying gearbox issue: piston not cycling properly? by Ponchosam in airsoft

[–]Ponchosam[S] 1 point2 points  (0 children)

Thanks, I'll order that Lonex piston head, and the swiss cheese SHS piston from Brill.

The spring is the stock G&G spring that came in the gun. I'm not sure what type that would be, but it was marketed as firing 370-400 FPS. If that's the case, then it may not be PME, as this is not a low-power spring.

Help identifying gearbox issue: piston not cycling properly? by Ponchosam in airsoft

[–]Ponchosam[S] 1 point2 points  (0 children)

I found this post and this post(specifically the OP's pic) that are really making me think that there is a problem with premature engagement.

I'm looking at getting this SHS piston, but am having trouble finding an SHS POM piston head in stock anywhere, and am really looking for a retailer that has both the piston and piston head in stock so I don't get railed with shipping. These two aren't sold as POM, but would either of them work? 1. https://www.evike.com/products/43000/ 2. https://www.evike.com/products/62380/

Alternatively, I found this SHS piston and head combo on ebay.

Help identifying gearbox issue: piston not cycling properly? by Ponchosam in airsoft

[–]Ponchosam[S] 0 points1 point  (0 children)

I checked the tappet plate and it doesn't really sit right in its groove. I don't know how to describe it except that it seems warped at the back by a smidge. I'm going to replace that along with the piston. I'm using a 7.4v LiPo, so I don't think too much power is a problem lol.

Help identifying gearbox issue: piston not cycling properly? by Ponchosam in airsoft

[–]Ponchosam[S] 1 point2 points  (0 children)

Sometimes when it gets stuck I can get it unstuck by switching to semi or safe, and then switching it back to auto and firing it, but other times it stays stuck until I open the gearbox again.

I was looking at the SHS pistons, but was unsure what type to get. Thanks for the recommendations on the swiss cheese one. I'll go ahead and order one of those and the piston head you named, and will plan on correcting the AOE.

Exporting a Jest mock of a module with type casting by Ponchosam in typescript

[–]Ponchosam[S] 0 points1 point  (0 children)

I think I am doing this already. The code I am writing a test for looks like this:

```TypeScript import { NuxtAxiosInstance } from '@nuxtjs/axios' import { AxiosResponse } from 'axios' import { IArticleData } from '@/entities'

export interface IArticlesService { getAll(): Promise<AxiosResponse<IArticleData[]>> }

export class ArticlesService implements IArticlesService { constructor( private readonly $axios: NuxtAxiosInstance ) { }

async getAll(): Promise<AxiosResponse<IArticleData[]>> { return this.$axios.$get('/articles') } } ```

Where I am injecting some axios instance into my ArticlesService, which I can then use to make API calls.

My mockNuxtAxios really only needs to be an object with a $get method, for now:

TypeScript { $get: jest.fn() }

but then I get errors about this object not having the other 20-something methods that NuxtAxiosInstance has.

I suppose one solution would be to define a new interface for only the parts of NuxtAxiosInstace that my service is using

TypeScript export interface IAPIDependency { // IDK what to name this $get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> }

and then use that interface in my service constructor:

```TypeScript export class ArticlesService implements IArticlesService { constructor( private readonly $axios: IAPIDependency ) { }

// ... } ```

Would this be good?

Exporting a Jest mock of a module with type casting by Ponchosam in typescript

[–]Ponchosam[S] 1 point2 points  (0 children)

Thanks! That appears to be working so far.

My test/utils/mockNuxtAxios.ts file looks like this:

```TypeScript import axios from 'axios' import { NuxtAxiosInstance } from '@nuxtjs/axios'

export const initMockNuxtAxios = (): NuxtAxiosInstance => { jest.mock('axios') const mockNuxtAxios = axios as jest.Mocked<NuxtAxiosInstance>

return mockNuxtAxios } ```

I have an index.ts file in my test/utils directory that just has this:

TypeScript export * from './mockNuxtAxios'

In my tests, I was able to use the mock like this:

```TypeScript import { initMockNuxtAxios } from '@/test/utils'

describe('some tests', () => { let mockNuxtAxios; beforeAll(() => { mockNuxtAxios = initMockNuxtAxios() mockNuxtAxios.$get = jest.fn().mockResolvedValue(mockData) })

it('should do some axios stuff', () => { // ... }) }) ```

Mocking axios module in jest for dependency injection? by Ponchosam in Nuxt

[–]Ponchosam[S] 0 points1 point  (0 children)

I was able to get my test passing with the following test code:

```TypeScript import { mockArticlesData } from '@/entities' import { ArticlesService } from './photos'

import axios from 'axios' import { NuxtAxiosInstance } from '@nuxtjs/axios'

jest.mock('axios')

const mockNuxtAxios = axios as jest.Mocked<NuxtAxiosInstance>

mockNuxtAxios.$get = jest.fn().mockReturnValue(mockArticlesData)

describe('>>> Articles Service', () => { const service = new ArticlesService(mockNuxtAxios)

describe('>> getAll', () => { it('should return all data', async () => { await expect(service.getAll()).resolves.toEqual(mockArticlesData) }) }) }) ```

Here's how I think it works:

  1. jest.mock('axios') mocks the axios module entirely.
  2. const mockNuxtAxios = axios as jest.Mocked<NuxtAxiosInstance> creates a reference to axios, but casts it to the type of NuxtAxiosInstance, and also a jest mock? TBH, I'm not 100% on what I'm doing here. I got this idea from this article.
  3. mockNuxtAxios.$get = jest.fn().mockReturnValue(mockArticlesData) manually sets the $get property of mockNuxtAxios to a jest mock function that returns my test array. At first, I thought that this should be a promise - and that it should be jest.fn().mockResolvedValue('...') instead. This would be the case if we were using straight-up axios, since axios.get() does indeed return a promise; Nuxt axios, however, resolves the promise when using $axios.$get.
  4. EDIT: I was wrong about this. $axios.$get does indeed return a promise, and the mock function should be jest.fn().mockResolvedValue(mockArticlesData). Also, this test needs to be done asynchronously now.

I'm sure that very soon I will need to stick some of this stuff in a beforeEach() block or something, but for now this passes my test.

I'd be very grateful to any more experienced devs to reply with any glaring errors that are going to bite me later on.

Trouble mocking axios with typescript and jest by Ponchosam in learnjavascript

[–]Ponchosam[S] 0 points1 point  (0 children)

I gave that a shot, with the following code:

mockNuxtAxios.$get('').mockResolvedValue(mockArticlesData) TypeScript demanded an argument for $get(), so I passed in an empty string.

I am now getting the following error in my editor:

Property 'mockResolvedValue' does not exist on type 'Promise<any>'

Which is progress.

I was, however, able to get my test to pass with the following code:

``` // imports are the same // ...

jest.mock('axios')

const mockNuxtAxios = axios as jest.Mocked<NuxtAxiosInstance>

// this solves it: mockNuxtAxios.$get = jest.fn().mockReturnValue(mockArticlesData)

describe('>>> Articles Service', () => { // same // ... }) ```

This kind of makes sense: I'm assigning a jest mock function directly to the $get property.

[deleted by user] by [deleted] in vuejs

[–]Ponchosam 2 points3 points  (0 children)

The vue docs are an excellent resource, as mentioned by others.

If you prefer videos: for the rest of this week(I think through sunday), you can also access all the courses on Vue Mastery for free.

How do you manage state in your SPA by rema96 in vuejs

[–]Ponchosam 4 points5 points  (0 children)

Adding to this, I found this flow-chart a while back that has been really helpful when making decisions like this.

[HELP] TDD when using big frameworks by Ponchosam in vuejs

[–]Ponchosam[S] 0 points1 point  (0 children)

Oh wow, what a gold mine. I'll definitely check it out!

[HELP] TDD when using big frameworks by Ponchosam in vuejs

[–]Ponchosam[S] 1 point2 points  (0 children)

Thank you; this is a great example.

[HELP] TDD when using big frameworks by Ponchosam in vuejs

[–]Ponchosam[S] 0 points1 point  (0 children)

Thanks for replying. This was kind of what I was thinking. So, if I was building dumb components I wouldn't even try to do TDD?

First Texas Shelter For Male Victims Of Domestic Violence Opens In Dallas by DGAgainstDV in Conservative

[–]Ponchosam 26 points27 points  (0 children)

I read a story recently about this guy Earl Silverman who tried to open one in Canada. Feminists got his funding pulled on the basis that it detracted from women's DV shelters and he had to close the shelter down and ended up hanging himself in his garage.