Skip to content

Instantly share code, notes, and snippets.

View tegain's full-sized avatar

Thomas Egain tegain

View GitHub Profile
@tegain
tegain / .gitconfig
Created June 8, 2023 15:59 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@tegain
tegain / rollup-typescript.md
Created July 4, 2022 16:58 — forked from aleclarson/rollup-typescript.md
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

@tegain
tegain / network-queue.interceptor.ts
Created March 11, 2021 11:24 — forked from OysteinAmundsen/network-queue.interceptor.ts
This will pick up all client requests, and make them poor-network-connection safe.
import { Injectable, EventEmitter } from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler, HttpSentEvent, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpUserEvent, HttpClient } from '@angular/common/http';
import { Observable, Observer, Subscription, throwError, timer } from 'rxjs';
import { retryWhen, mergeMap, finalize } from 'rxjs/operators';
@Injectable()
export class NetworkQueueInterceptor implements HttpInterceptor {
onChanges = new EventEmitter<boolean>();
private lastValue = this.isOnline();
@tegain
tegain / 1_AppButton.ts
Last active February 10, 2021 19:59
Comprendre les composants
/**
* Ce composant Vue...
*/
export default Vue.extend({
name: "AppButton",
props: {
icon: {
type: String,
default: null
@tegain
tegain / MakePowerShellRememberSSHPassphrase.md
Created January 24, 2020 20:43 — forked from danieldogeanu/MakePowerShellRememberSSHPassphrase.md
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services: a. Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window; b. Find the OpenSSH Authentication Agent in the list and double click on it; c. In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.

  2. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell: git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe;

  3. Configure SSH to automatically add the keys to the agent on startup by editing the config file found at C:\Users\%YOUR_USERNAME%\.ssh\config, and add the following lines: