Skip to content

Instantly share code, notes, and snippets.

@autobubenik
autobubenik / filename.txt
Created May 6, 2024 10:00
Unicorn Updated
Unicorn Updated
@maratori
maratori / golang-mocks.md
Last active May 6, 2024 09:59
Comparison of golang mocking libraries

Comparison of golang mocking libraries

Updated 2024-04-21

Uber
[gomock][6]
[testify][2] + [mockery][3] [minimock][4] [moq][5] Google
[gomock][1]

Library

GitHub stars [![s6]][6] [![s2]][2] + [![s3]][3] [![s4]][4] [![s5]][5] [![s1]][1]
Latest release date [![d6]][r6] [![d2]][r2] + [![d3]][r3] [![d4]][r4] [![d5]][r5] [![d1]][r1]
Maintained :white_check
@Faq
Faq / gist:8821c5fd18dd01da4f80d7435158096d
Last active May 6, 2024 09:59
Install chrome & chromedriver for Docker image 2022
Source: https://gist.github.com/varyonic/dea40abcf3dd891d204ef235c6e8dd79
Change log:
1. replaced "dl-ssl.google.com" with "dl.google.com" according https://www.google.com/linuxrepositories/
2. replaced "apt-key" as "Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))."
3. use https
Oneliner for Dockerfile:
RUN set -ex; \
# This supports merging as many adapters as you want.
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model>
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
@oshingc
oshingc / Git Commands
Last active May 6, 2024 09:57
Git Commands - Saving changes to a new Branch
//Get the project
git clone git@github.com:username/repositoryname.git
//Make changes to the project
//Problem! You made changes to the project beeing on master branch, how do you save those changes to a new branch?
//Save a stack
git stash
//Check actual file mode
@GromNaN
GromNaN / async-twig.php
Last active May 6, 2024 09:57
Asynchronous Twig PHP
<?php
/**
* Demo ReactPHP application using Twig in yielding mode with an async function.
*/
namespace App;
use Exception;
use Psr\Http\Message\ServerRequestInterface;
@Da9el00
Da9el00 / docker-compose.yml
Created February 7, 2023 09:08
How to create a docker-compose setup with PostgreSQL and pgAdmin4
version: "3.8"
services:
db:
container_name: postgres_container
image: postgres
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: test_db
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 6, 2024 09:56
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@bistory
bistory / Klipper Anycubic i3 Mega
Last active May 6, 2024 09:53
Anycubic i3 Mega configuration for Klipper (with TMC2209 + SPI, BMG extruder with stock motor, pressure advance and BLTouch clone)
# This file contains pin mappings for the Anycubic i3 Mega with
# Ultrabase from 2017. (This config may work on an Anycubic i3 Mega v1
# prior to the Ultrabase if you comment out the definition of the
# endstop_pin in the stepper_z1 section.) To use this config, the
# firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PF0
@gabe565
gabe565 / change-arc-icon.md
Last active May 6, 2024 09:53
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy