Skip to content

Instantly share code, notes, and snippets.

@benjaminv
benjaminv / setup-auto-auth-for-multiple-git-accounts.md
Last active September 19, 2024 23:40
Final & Working guide for living with multiple Git accounts

permlink: https://gist.github.com/benjaminv/092f3d87afcbe589ca2a03fa9358050f

1. Generate a new SSH key-pair for each of Git account.

$ ssh-keygen -t rsa -b 4096 -C "benvee@gmail.com" -f ~/.ssh/id_rsa_benjaminv_github
$ ssh-keygen -t rsa -b 4096 -C "ben@mycompany.com.au" -f ~/.ssh/id_rsa_bendhu_github
$ ssh-keygen -t rsa -b 4096 -C "ben@mycompany.com.au" -f ~/.ssh/id_rsa_benhu1_gitlab

# The -C option is a comment to help identify the key.
# The -f option specifies the file name for the key pair.
@benjaminv
benjaminv / .gitignore
Created April 22, 2022 00:06 — forked from ashsmith/.gitignore
Magento 1.x .gitignore
# Never save database creditentials in your repo. Keep a dummy copy with a different name eg "local.xml.dev"
app/etc/local.xml
downloader
# If you'd like to keep the downloader, use the following instead:
# downloader/.cache
# downloader/cache.cfg
# downloader/connect.cfg
# All of the var folders can be excluded.
@benjaminv
benjaminv / _default-variables.scss
Created March 31, 2022 01:19 — forked from devkinetic/_default-variables.scss
Backport Bootstrap 4 spacing classes to Bootstrap 3 SASS/SCSS
//== Spacing
//
$grid-breakpoints: (
xs: 0,
sm: $screen-sm-min,
md: $screen-md-min,
lg: $screen-lg-min
);
$spacer-x-0: 0rem;
$spacer-y-0: 0rem;
@benjaminv
benjaminv / wsl2-ubuntu-lamp.md
Created September 9, 2021 05:20 — forked from abobija/wsl2-ubuntu-lamp.md
LAMP stack on WSL2 (Ubuntu 20.04) - Apache, MySQL, PHP, PhpMyAdmin

LAMP stack on WSL2 (Ubuntu 20.04) - Apache, MySQL, PHP, PhpMyAdmin

Apache

sudo apt-get update && sudo apt-get upgrade 
sudo apt-get install -y apache2

PHP

/**
* Print Stylesheet fuer Deinewebsite.de
* @version 1.0
* @lastmodified 16.06.2016
*/
@media print {
/* Inhaltsbreite setzen, Floats und Margins aufheben */
/* Achtung: Die Klassen und IDs variieren von Theme zu Theme. Hier also eigene Klassen setzen */
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@benjaminv
benjaminv / html-table-to-markdown-extra.html
Created September 20, 2018 03:29 — forked from sunnywalker/html-table-to-markdown-extra.html
HTML Table to Markdown Extra converter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML Table to Markdown Extra Table</title>
<style type="text/css">
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
body { font-family: -apple-system, "Segoe UI", Arial, Helvetica, sans-serif; line-height: 1.5;
text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
textarea { width: 100%; height: 15em; }