Skip to content

Instantly share code, notes, and snippets.

@jackinf
jackinf / MakePowerShellRememberSSHPassphrase.md
Created October 11, 2021 08:54 — 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:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • 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.
  1. 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
@jackinf
jackinf / Connection.cs
Created June 4, 2017 09:51 — forked from lancscoder/Connection.cs
Dapper Getting Started
public class ConnectionFactory {
public static DbConnection GetOpenConnection() {
var connection = new SqlConnection("MyConnectionString");
connection.Open();
return connection;
}
}
@jackinf
jackinf / 0_reuse_code.js
Created May 31, 2015 16:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jackinf
jackinf / Slider-shorter.js
Created July 28, 2012 08:39 — forked from alfongj/Slider-shorter.js
Shorter version of Jeffrey Way's jQuery slider done in episode 15 of Learn jQuery in 30 days
(function($) {
var sliderUL = $('div.slider').css('overflow', 'hidden').children('ul'),
imgs = sliderUL.find('img'),
imgWidth = imgs[0].width, // 600
imgsLen = imgs.length, // 4
current = 0, //0: first
$('#slider-nav').show().find('button').on('click', function() {
var direction = $(this).data('dir'),
move = ( direction === 'next' ) ? 1 : -1; //1 forward, -1 backward