Skip to content

Instantly share code, notes, and snippets.

View jaredcnance's full-sized avatar

Jared Nance jaredcnance

  • Amazon Web Services
  • Seattle
View GitHub Profile
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@TheLarkInn
TheLarkInn / puppetteer-get-coverage.js
Created June 30, 2018 22:44
Get's coverage data from a url using puppetteer.
const puppetteer = require("puppeteer");
/**
* @param {string} pageUrl The URL that you want to gather coverage data for
*/
const unusedCode = async pageUrl => {
const browser = await puppetteer.launch();
console.log("browser launched");
const page = await browser.newPage();
console.log("new page created");
@tebeco
tebeco / RawConversation_NoLayout.txt
Created August 17, 2017 09:39
David Fowler AuthN
jeffpapp [8:13 AM]
Yeah, I’d be interested in that. Just haven’t had to look at monitors in a year or so
damccull [8:13 AM]
Ah hah...I was using DefaultAuthenticationScheme when apparently I should be using DefaultScheme.
[8:14]
yep
@stefanhendriks
stefanhendriks / cookieshelper.cs
Last active June 4, 2023 17:14
A cookies helper class to easily read and set cookies on HttpRequest (Asp.Net Core)
public class CookiesHelper
{
// Inspired from:
// https://github.com/aspnet/Mvc/blob/538cd9c19121f8d3171cbfddd5d842cbb756df3e/test/Microsoft.AspNet.Mvc.FunctionalTests/TempDataTest.cs#L201-L202
public static IDictionary<string, string> ExtractCookiesFromResponse(HttpResponseMessage response)
{
IDictionary<string, string> result = new Dictionary<string, string>();
IEnumerable<string> values;
@klugjo
klugjo / gulpfile.js
Last active February 16, 2022 13:14
Basic gulpfile.js for a static website with browser auto refresh
// Add our dependencies
var gulp = require('gulp'), // Main Gulp module
concat = require('gulp-concat'), // Gulp File concatenation plugin
open = require('gulp-open'), // Gulp browser opening plugin
connect = require('gulp-connect'); // Gulp Web server runner plugin
// Configuration
var configuration = {
paths: {
@bitcrazed
bitcrazed / boxstarter.ps1
Last active November 3, 2022 21:31
Boxstarter script
# Description: Boxstarter Script
# Author: Rich Turner <rich@bitcrazed.com>
# Last Updated: 2019-07-08
#
# Run this Boxstarter by calling the following from an **ELEVATED PowerShell instance**:
# `set-executionpolicy Unrestricted`
# `. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force`
# `Install-BoxstarterPackage -DisableReboots -PackageName <URL-TO-RAW-GIST>`
#---- TEMPORARY ---
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real