Skip to content

Instantly share code, notes, and snippets.

View motowilliams's full-sized avatar

Eric Williams motowilliams

View GitHub Profile
@motowilliams
motowilliams / trello-css-guide.md
Last active August 29, 2015 14:27 — forked from bobbygrace/trello-css-guide.md
Trello CSS Guide

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
@motowilliams
motowilliams / Resolve-HostName.ps1
Created January 28, 2016 05:31
Looks up public IP address and gets the public host name
$ipaddress = Invoke-RestMethod -Uri "https://api.ipify.org"
$dnsName = Resolve-DnsName -Name $ipaddress
$nameHost = $dnsName.NameHost
@motowilliams
motowilliams / verify-download.ps1
Created March 1, 2016 23:04
Simple MD5 checksum to see if the local file hash matches the declared remote md5 checksum
$url = "http://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$output = "$PSScriptRoot\nuget.exe"
$headRequest = Invoke-WebRequest -Method head -Uri $url
$remotehash = $headRequest.Headers.'Content-MD5'
Invoke-WebRequest -Uri $url -OutFile $output
$fileData = Get-FileHash -Path $output -Algorithm MD5
$bytes = [System.Text.Encoding]::UTF8.GetBytes($fileData.Hash)
@motowilliams
motowilliams / Make List.txt
Last active February 20, 2017 17:42
Make List
April Wilkerson - https://www.youtube.com/channel/UC4v2tQ8GqP0RbmAzhp4IFkQ
colinfurze - https://www.youtube.com/channel/UCp68_FLety0O-n9QU6phsgw
Darbin Orvar - https://www.youtube.com/channel/UCIrtu3uSwehD0pfmfMsHhUA
DN Handcrafted - https://www.youtube.com/channel/UCpMWio7UVcxsXlFbAu56LcA
FineWoodworking - https://www.youtube.com/channel/UC47EhkMV18WlRqV3VhUH3yg
I Build It - https://www.youtube.com/channel/UCzGbp-rRVNwyFhn9gHoZr5g
I Like To Make Stuff - https://www.youtube.com/user/iliketomakestuffcom
izzy swan - https://www.youtube.com/user/rusticman1973
Jay Bates - https://www.youtube.com/channel/UC-7XY-W_C84cW2MNqujgFpg
jimmydiresta - https://www.youtube.com/channel/UCiEk4xHBbz0hZNIBBpowdYQ
@motowilliams
motowilliams / Add-RewriteRule.ps1
Created March 12, 2017 22:55
Adds a rule to proxy yourhost.example.com to localhost:yourportnumber with IIS Url Rewrite
param (
[string]$domain,
[string]$hostName,
[string]$port
)
$ruleName = "$hostName-inbound"
$publicHost = "$hostName.$domain"
$privateHost = "http://localhost:$port/{R:1}"
$downloads = "C:\Downloads"
if(!(Test-Path $downloads\7za.exe)){
Write-Host "Creating $downloads Directory"
$directory = New-Item -ItemType Directory -Path $downloads
}
# we need something to handle this tarball since Windows natively can't
if(!(Test-Path "$downloads\7zip\7za.exe")){
Write-Host "Downloading 7-Zip"
choco install git -y
choco install firefox -y
choco install jdk8 -y
choco install intellijidea-community -y
choco install gradle -y
choco install androidstudio -y
choco install nodejs-lts -y
choco install nvm -y
@motowilliams
motowilliams / Set-Parameters.xml
Last active April 11, 2017 17:19
MSDeploy Match XPath
<?xml version="1.0" encoding="utf-8"?>
<parameters>
<parameter name="UpdateNHibernateConfig" defaultValue="{connectionstring}">
<parameterEntry
kind="Xmlfile"
scope="hibernate.cfg.xml"
match="/*[local-name()='hibernate-configuration']/*[local-name()='session-factory']/*[local-name()='property'][@name='connection.connection_string']/text()"
/>
</parameter>
</parameters>
@motowilliams
motowilliams / error.md
Last active November 9, 2017 09:43
Xamarin.Android Build Failures
  • No build definition changes and the solution builds locally.
  • Build fails on master branch where changes haven't been landed for a few days.
2017-10-31T21:58:47.2398136Z ##[error]Unable to process command '##vso[telemetry.publish area=Tasks.CrossPlatform;feature=XamarinAndroid]{ "jdkVersion": default }' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
2017-10-31T21:58:47.2408444Z ##[error]Unable to parse telemetry data { "jdkVersion": default }. Error: Unexpected character encountered while parsing value: d. Path 'jdkVersion', line 1, position 16.
2017-10-31T21:58:47.2408444Z ##[debug]System.ArgumentException: Unable to parse telemetry data { "jdkVersion": default }. Error: Unexpected character encountered while parsing value: d. Path 'jdkVersion', line 1, position 16.
   at Microsoft.VisualStudio.Services.Agent.Worker.Telemetry.TelemetryCommandExtension.ProcessPublishTelemetryCommand(IExecutionContext context, Dictionary`2 eventProperties, String data)