Skip to content

Instantly share code, notes, and snippets.

@bublick
bublick / git-ssh-auth-win-setup.md
Created March 28, 2024 14:37 — forked from bsara/git-ssh-auth-win-setup.md
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/uname/) called .ssh.
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
  • .ssh/config
@artoodetoo
artoodetoo / file_get_contents_ex.php
Created February 20, 2016 18:56
Use file_get_contents() with cookies and proxy (optionally with auth)
<?php
function file_get_contents_ex($url, $cookie = null, $proxy = null, $auth = null)
{
$opts = array(
'http' => array(
'method' => 'GET',
'user-agent'=> 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36',
'header' => "Accept-language: en\r\n" .
(!empty($auth) ? "Proxy-Authorization: Basic {$auth}\r\n" : '') .