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 / __react-native.md
Last active September 9, 2019 18:19
React Native - Android & IOS development

React Native

Android Development

SDK location and tools

ANDROID_SDK_ROOT=%LOCALAPPDATA%\Android\Sdk
using System;
using System.Linq;
namespace PasswordCheck
{
class Program
{
static void Main(string[] args)
{
while (true)
@jackinf
jackinf / __nodejs-typescript-nodemon-starter.md
Created July 17, 2019 12:22
How to start Node.js app with Typescript and Nodemon

How to start Node.js app with Typescript and Nodemon

Install dependencies

npm i -S nodemon ts-node typescript

Copy the nodemon.json configuration file

@jackinf
jackinf / __useful-bash-scripts.md
Created July 2, 2019 13:52
Useful bash scripts

Useful bash scripts

Removes unused dependencies

#!/bin/bash

for dep in $(jq -r '.dependencies | keys | .[]' package.json); do
  if ! grep "from .*$dep.*;" -Rq --exclude-dir="node_modules" .; then
 echo "You can probably remove $dep"
@jackinf
jackinf / compose_ddc.cs
Last active July 4, 2019 08:23
Sample response from WorldPay DDC
namespace Sandbox
{
class Progam
{
public static void Main()
{
var sessionId = "your-session-id";
var template = $@"
<!DOCTYPE html>
<html>
@jackinf
jackinf / __rx__.md
Created April 18, 2019 11:43
Reactive Programming snippets

RxJS personal examples

Two consequent dependent API calls

const { XMLHttpRequest } = require('xmlhttprequest');
const { ajax } = require('rxjs/ajax');
const { mergeMap } = require('rxjs/operators/mergeMap');

const config = {
@jackinf
jackinf / ing-get-token.sh
Last active April 3, 2019 19:01
ING sandbox script
#!/bin/bash
# Generate the signature
export LANG=en_US
payload="grant_type=client_credentials"
payloadDigest=`echo -n "$payload" | openssl dgst -binary -sha256 | openssl base64`
digest=SHA-256=$payloadDigest
reqDate=$(LC_TIME=en_US.UTF-8 date -u "+%a, %d %b %Y %H:%M:%S GMT")
reqId=`uuidgen`
httpMethod=post
@jackinf
jackinf / __gcloud-commands-cheatsheet.md
Last active January 31, 2020 10:34
GCloud commands cheatsheet

GCloud commands

Auth accounts

To re-initialize account

gcloud init

Manage accounts using gcloud auth

@jackinf
jackinf / __azure-scripts.md
Last active June 22, 2021 09:45
Azure scripts; Azure storage