Skip to content

Instantly share code, notes, and snippets.

View Bujhm's full-sized avatar
🐢
I may be slow to respond.

Igor Bujhm

🐢
I may be slow to respond.
View GitHub Profile
@patsbin
patsbin / gist:868c48c5e8b3de1ccad7dd19257f7a17
Created March 3, 2022 15:10
Keychain Error: Problem adding; giving up
Getting an error after migrating to a new system when adding private keys to ssh-agent
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa.key
* Error: Problem adding; giving up
Manually adding the key shows a permission problem
ssh-add ~/.ssh/id_rsa.key
chmod 700 /home/pwi/.ssh/*.key
In .bashrc
@bonnopc
bonnopc / multipleSSHkeysForUnix.md
Created November 23, 2021 17:06
Enable Multiple SSH Keys for MacOS/ Ubuntu/ Debian etc.

Enable Multiple SSH Keys for UNIX Based OS

Follow these steps below to enable multiple SSH keys on your device with UNIX Based OS (MacOS/ Ubuntu/ Debian etc.). Suppose, you have two different users/ accounts, one is personalAccount and another is companyAccount. And you have already a default key configured with personalAccount. (If you haven't set up your default ssh-key yet, please follow this article before going ahead with these steps described below.)

1. Generate another ssh-key

Generate a new ssh-key for your companyAccount.

cd ~/.ssh
ssh-keygen -t rsa -C "your_email@youremail.com"
@gilbitron
gilbitron / CaddyController.php
Created June 16, 2021 10:55
Enabling HTTPS (SSL) for Laravel Sail using Caddy
<?php
# app/Http/Controllers/CaddyController.php
namespace App\Http\Controllers;
use App\Store;
use Illuminate\Http\Request;
class CaddyController extends Controller
{
@carlolars
carlolars / .wsl-git.md
Last active February 4, 2024 07:21
HOWTO: Use WSL and its Git in a mixed development environment

How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.

Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.

Tools

These are the tools I use:

  • git (wsl) - Command line git from within WSL.
  • Fork (windows) - Git GUI (must be used with wslgit)
  • wslgit - Makes git from WSL available for Windows applications. Important! Follow the installation instructions and do (at least) the first optional step and then the Usage in Fork instructions.
@bigprof
bigprof / phpunit.xml
Created February 17, 2019 17:30
Sample PPHUnit config
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
@VisualBean
VisualBean / Dockerfile
Created January 3, 2019 22:45
post alpine update
FROM node:8.15-alpine
RUN apk --no-cache add git
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 26, 2024 19:46
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@brunosimioni
brunosimioni / docker-compose.yml
Created February 27, 2018 17:46
Docker Compose to Prometheus, PushGateway and Grafana setup
version: '2.1'
networks:
monitor-net:
driver: bridge
volumes:
prometheus_data: {}
grafana_data: {}
@kunicmarko20
kunicmarko20 / ImageProvider.php
Last active May 22, 2024 12:30
Sonata Media SVG Provider
<?php
namespace YourBundle\Provider;
use Sonata\MediaBundle\Provider\FileProvider;
class ImageProvider extends FileProvider
{
}
@kunicmarko20
kunicmarko20 / Readme.md
Last active May 4, 2022 06:33
Sonata Admin Custom Page

Sonata Admin Custom Page

This example will help you create custom Sonata Admin page and also explain how to make a statistics admin.

You can read more here