Skip to content

Instantly share code, notes, and snippets.

View JoshuaTheMiller's full-sized avatar
🎯
Focusing

Joshua Miller JoshuaTheMiller

🎯
Focusing
View GitHub Profile
@JoshuaTheMiller
JoshuaTheMiller / TravisBuildKicker.sh
Last active January 11, 2018 19:37
A shell script for kicking off Travis-CI builds. Requires 3 environment vars to be set.
#!/bin/bash
# Requires 3 env vars to be set:
# ACCESS_TOKEN - your Travis-CI auth token. https://medium.com/@aflyingcaveman/retrieving-your-travis-ci-api-access-token-bc706b2b625a
# REPO_TO_KICK - the name of the repo to kick.
# OWNER_OF_REPO - your repo owner name.
body='{
"request":{
"branch":"master",
@JoshuaTheMiller
JoshuaTheMiller / .travis.yml
Created January 8, 2018 21:51
A Travis-CI config file for deploying an Angular app to a GitHub repo
language: node_js
node_js:
- "8.9.0"
branches:
only:
- master
install:
- npm install -g @angular/cli
@JoshuaTheMiller
JoshuaTheMiller / docker_cleanup.ps1
Last active December 4, 2017 23:54
A simple PowerShell cleanup script for a **development** environment that uses Docker. This just force removes things.
$shouldDeleteImages = Read-Host -Prompt 'Do you wish to delete all images? Default is no. (y/n)'
$listOfContainers = (docker ps -a -q)
if($listOfContainers)
{
"There are containers, they shall now be removed."
docker rm $($listOfContainers) --force
@JoshuaTheMiller
JoshuaTheMiller / ListViewVsListBox.xaml
Created March 6, 2017 19:42
A comment on an MSDN Blog article - ListBox
<!--I believe the control that should actually be used is a ListBox. While ListView does indeed derive from ListBox, and the ItemTemplate property is left exposed, to actually change how the data is presented you should have changed "ListView.View" (finding out why requires some more reading on ListViews). The problem with this is that ListView.View is of type ViewBase and the only concrete implementation of ViewBase that ships with WPF is "GridView". Creating a list that looks like your picture, with a ListView, would require something like this: -->
<ListView ItemsSource="{Binding MyStringList}">
<ListView.View>
<GridView>
<GridView.ColumnHeaderContainerStyle>
<Style TargetType="GridViewColumnHeader">
<Setter Property="Visibility" Value="Collapsed" />
</Style>
</GridView.ColumnHeaderContainerStyle>