Skip to content

Instantly share code, notes, and snippets.

View p0lar-bear's full-sized avatar

Chris p0lar-bear

  • Connecticut, USA
View GitHub Profile
@p0lar-bear
p0lar-bear / Install-Composer.ps1
Last active April 1, 2019 19:12
Composer Installer Script, Powershell Version
# NOTE: This is a near-1:1 translation of the installer script provided at
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
# to Windows PowerShell from UNIX sh/bash.
# This requires php.exe's containing folder to be on the PATH, and will also
# create a batch file for easy execution of Composer from cmd or Powershell.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sigRequest = Invoke-WebRequest https://composer.github.io/installer.sig
$EXPECTED_SIGNATURE = [System.Text.Encoding]::UTF8.GetString($sigRequest.Content).Trim()
@p0lar-bear
p0lar-bear / input-file.decorator.js
Created December 14, 2018 17:50
AngularJS 1.4+ Styleguide-friendly support of ngModel in input[type=file] elements
(function() {
'use strict';
/**
* @ngdoc input
* @name input[file]
*
* @description
* Adds very basic support for ngModel to `input[type=file]` fields.
*