Skip to content

Instantly share code, notes, and snippets.

View ChrisTowles's full-sized avatar

Chris Towles ChrisTowles

View GitHub Profile
@ChrisTowles
ChrisTowles / ExpanderIcon.vue
Last active April 16, 2019 01:49
has fade of icon
<template>
<span class="parent">
<transition name="component-fade" mode="out-in">
<i v-if="!expanded" class="fa fa-chevron-right" aria-hidden="true" :key="1"></i>
<i v-else class="fa fa-chevron-right fa-rotate-90" aria-hidden="true" :key="2"></i>
</transition>
</span>
</template>
<script>
@ChrisTowles
ChrisTowles / commands.openSeq2Seq.md
Last active February 14, 2019 01:59
ML - commands working with openSeq2Seq
conda activate tf

# no idea why but had problems with ~ in path. 

cd /home/towlesd/Code/tacotron2
mkdir /home/towlesd/OutputDir/
mkdir /home/towlesd/OutputDir/tacotron2
@ChrisTowles
ChrisTowles / Overdrive in browser download a book as mp3s.js
Last active December 24, 2023 16:07
Get the download links from a book mp3 in overdrive
//open window to the lent book.
var baseUrl = "https://ofs-" + window.bData["-odread-buid"] + ".listen.overdrive.com"
window.bData.spine.forEach(function(x) { console.log("" + baseUrl + "/" + x.path ) } )
var model = {
title: window.bData.title,
parts: [],
};
@ChrisTowles
ChrisTowles / test-diagram
Created March 15, 2018 15:05
HTML Diagram with html
<h1>Braze Flows<h1>
<h2>Order Receipt Email</h2>
This is the scenario when an order is completed send them a personalized email
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script>
<script src="https://bramp.github.io/js-sequence-diagrams/js/webfont.js"></script>
<script src="https://bramp.github.io/js-sequence-diagrams/js/snap.svg-min.js"></script>
<script src="https://bramp.github.io/js-sequence-diagrams/js/underscore-min.js"></script>
@ChrisTowles
ChrisTowles / ExportAndImportCertToBase64.cs
Last active November 28, 2023 21:05
C# Import or Export Cert to Base64 String
public void ExportCertToBase64()
{
var certificate = new System.Security.Cryptography.X509Certificates.X509Certificate2("c:\\temp\\Signing Cert.pfx", "XXXXXXXXXXXXXX", X509KeyStorageFlags.Exportable);
StringBuilder builder = new StringBuilder();
builder.AppendLine("-----BEGIN CERTIFICATE-----");
builder.AppendLine(Convert.ToBase64String(certificate.Export(X509ContentType.Pkcs12, "XXXXXXXXXXXXXX"), Base64FormattingOptions.InsertLineBreaks));
builder.AppendLine("-----END CERTIFICATE-----");
@ChrisTowles
ChrisTowles / XSD Test.txt
Created July 6, 2016 12:07
Note to self on the C# Xsd to xml.
Notes for self on XSD to XML
http://stackoverflow.com/questions/6530424/generating-xml-file-using-xsd-file
Open "Developer Command Prompt" and Run the following commands to update the CS file.
d:
cd "D:\Code\TFS\.....\XSD Template"
@ChrisTowles
ChrisTowles / BakeMateralToTexture.cs
Created July 6, 2016 03:20
Updated Unity 5.3 Bake Material to Texture.
// This doesn't work or at least it didn't for the shader i was trying to use it with.
// Just Sharing Becasue i got farther with this than other version I found around the internet.
//
// Quit working on this because the shader i was trying to convert to a Standard Unity Shader
// Really could not be done as it was based reflections of orginal object (PolyWorld).
//orginal - http://wiki.unity3d.com/index.php/Bake_Material_to_Texture
using UnityEngine;
using UnityEditor;
@ChrisTowles
ChrisTowles / Create Self Signed Cert and Add to Trusted Root.ps1
Last active July 7, 2016 09:52
For Local Development, to Create a Self Signed Cert and then add it to the Trusted Root Certifcations.
#Note : NOT FOR PRODUCTION USE. Development boxes only.
Import-Module PKI
$tempPath = "C:\Temp"
$certPath = "$tempPath\SelfSignedCert.cer"
$dnsName = '*.somedomain.com'
#Create Temp Folder

Keybase proof

I hereby claim:

  • I am christowles on github.
  • I am ctowles (https://keybase.io/ctowles) on keybase.
  • I have a public key whose fingerprint is 8833 7251 27F7 A317 B286 F627 3A49 110C C9CE 1FD4

To claim this, I am signing this object: