Skip to content

Instantly share code, notes, and snippets.

View Oscarz90's full-sized avatar
πŸ€“
coding...

Oscar Oscarz90

πŸ€“
coding...
View GitHub Profile
@sluger
sluger / AsyncMuiAutocomplete.test.tsx
Last active August 30, 2024 22:13
Testing MUI (@mui/material) autocomplete component with react-testing-library and async options simulated by a sleep
import Asynchronous from './AsyncAutocomplete';
import { render, screen, fireEvent, waitFor, prettyDOM, within } from '@testing-library/react';
describe('Async autocomplete', () => {
it('renders options', async () => {
render(<Asynchronous></Asynchronous>);
await waitFor(() => expect(screen.getAllByText('Asynchronous')).toBeDefined());
const combobox = screen.getByRole('combobox');
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

Data Structures
- Stacks
- Queues
- Linked lists
- Graphs
- Trees
- Tries
Concepts
- Big O Notation
@parmentf
parmentf / ConventionalCommitsEmoji.md
Last active April 13, 2025 19:11
Emoji for Conventional Commits
Type Emoji code
feat ✨ :sparkles:
fix πŸ› :bug:
docs πŸ“š :books:
style πŸ’Ž :gem:
refactor πŸ”¨ :hammer:
perf πŸš€ :rocket:
test 🚨 :rotating_light:
build πŸ“¦ :package:
@MattJermyWright
MattJermyWright / Dockerfile
Last active March 22, 2019 17:30
General: Updated Jenkins Setup
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y wget git curl
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-8-jdk
RUN apt-get update && apt-get install -y maven ant ruby rbenv make
RUN wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | apt-key add -
RUN echo deb http://pkg.jenkins-ci.org/debian-stable binary/ >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y jenkins
RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home
ADD init.groovy /tmp/WEB-INF/init.groovy
@dlyapun
dlyapun / gist:b06d4622ec7c34d4025b102a4ecb6d5c
Created November 22, 2017 15:20
Test Django admin actions save_model save_related
from django.core.urlresolvers import reverse
from django.test import TestCase, Client
from django.contrib.admin.sites import AdminSite
from gloodny.models import *
from django.forms.models import model_to_dict
class ChangeHistoryTests(TestCase):
fixtures = ['init_gloodny.json']
@troyfontaine
troyfontaine / 1-setup.md
Last active April 15, 2025 22:02
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@sam-artuso
sam-artuso / setting-up-babel-nodemon.md
Last active March 30, 2025 10:24
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@Bhavdip
Bhavdip / sketch-never-ending.md
Created October 6, 2016 15:53
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com