Skip to content

Instantly share code, notes, and snippets.

View BaconSoap's full-sized avatar

Andrew Varnerin BaconSoap

View GitHub Profile
@BaconSoap
BaconSoap / config.yml
Last active October 15, 2020 21:40
CircleCI config for building/deploying a GatsbyJS site
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build-job:
docker:
- image: circleci/node:8.9.3
@BaconSoap
BaconSoap / 0 webhook.json
Created October 21, 2017 14:05
Webhook vs API commits
{
"id": "1a02b4f0f200cb1788de31d993727f287da39639",
"tree_id": "0aa0b6187c1298edca0a6d67b23b43e0c6f8f43c",
"distinct": true,
"message": "fix travis again",
"timestamp": "2017-09-17T16:35:36-04:00",
"url": "https://github.com/BaconSoap/branch-destroyer/commit/1a02b4f0f200cb1788de31d993727f287da39639",
"author": {
"name": "Andrew Varnerin",
"email": "andrew@varnerin.info",
@BaconSoap
BaconSoap / happier-authentication.cs
Last active September 2, 2017 19:19
stop clobbering cookies, ASP.NET/OWIN
public void ConfigureAuth(IAppBuilder app)
{
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
CookieManager = new SystemWebChunkingCookieManager()
});
var authenticationOptions = new OpenIdConnectAuthenticationNotifications();
@BaconSoap
BaconSoap / typechecked-connected-component.tsx
Created June 5, 2017 13:25
A TypeScript connected component
import * as React from 'react';
import { connect } from 'react-redux';
import { IAppState } from '../IAppState';
import { doThing } from './reducer'
let mapDispatchToProps = {
doThing
};
interface IExampleComponentProps {
@BaconSoap
BaconSoap / app.js
Created May 26, 2015 01:48
blog-leaflet-mapping: iteration 3
(function(){
var map;
var nextMarkerNumber = 1;
var catImg = '<img src="http://thecatapi.com/api/images/get?format=src&type=png&size=small">';
function init() {
// create a new map with no base layer
map = new L.Map("map", {
center: new L.LatLng(42.3964631, -71.1205171),
zoom: 16
@BaconSoap
BaconSoap / app.js
Created May 26, 2015 01:20
blog-leaflet-mapping: iteration 2
(function(){
var map;
var catImg = '<img src="http://thecatapi.com/api/images/get?format=src&type=png&size=small">';
function init() {
// create a new map with no base layer
map = new L.Map("map", {
center: new L.LatLng(42.3964631, -71.1205171),
zoom: 16
});
@BaconSoap
BaconSoap / app.js
Created May 26, 2015 00:27
blog-leaflet-mapping: iteration 1
(function(){
var map;
function init() {
// create a new map with no base layer
map = new L.Map("map", {
center: new L.LatLng(42.3964631, -71.1205171),
zoom: 16
});
@BaconSoap
BaconSoap / connect.sh
Last active August 29, 2015 14:16
Script to connect to Windows via command line on an OS X machine
#!/bin/sh
WINDOWSHOST = "//user@guest-hostname"
SHAREDIR = "~/smb"
# make sure the mount dir on host exists
if [ ! -d "$SHAREDIR/$1" ]; then
mkdir "$SHAREDIR/$1"
fi

Keybase proof

I hereby claim:

  • I am BaconSoap on github.
  • I am andrewvarnerin (https://keybase.io/andrewvarnerin) on keybase.
  • I have a public key whose fingerprint is 578C 95A7 81BD 8474 0BCC A4B9 1B72 847E 379F 939C

To claim this, I am signing this object:

public static void class ScriptManagerExtensions {
public static RegisterJsonObject(this ScriptManager manager, Page page, Object obj, string varName) {
var serialized = SERIALIZE(obj); //make this use your JSON library
var createVar = "; " + varName + " = " + serialized + ";";
manager.RegisterClientScriptBlock(page, page.GetType(), varName, createVar, true);
}
}