Skip to content

Instantly share code, notes, and snippets.

Jim Counts jamesrcounts

Block or report user

Report or block jamesrcounts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jamesrcounts
jamesrcounts / Dockerfile
Last active Nov 18, 2019
Snippets to illustrate container pipelines in Azure DevOps
View Dockerfile
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine
RUN apk update && apk upgrade --no-cache
WORKDIR /app
COPY ./dist .
ENTRYPOINT ["dotnet", "parrot.dll"]
@jamesrcounts
jamesrcounts / azure-create-terraform-backend.sh
Last active Oct 14, 2019
Snippets to illustrate getting started with Terraform in Azure DevOps
View azure-create-terraform-backend.sh
#!/usr/bin/env bash
set -euo pipefail
ID=$(uuidgen)
LOCATION=westus
RG=terraformrg
# Create unique name for storage account
STORAGE_ACCOUNT=$(echo "terraform-${ID}" | tr '[:upper:]' '[:lower:]' | sed 's/-//g' | cut -c1-24)
@jamesrcounts
jamesrcounts / settings.json
Last active Nov 28, 2019
VSCode Settings
View settings.json
{
"files.autoSave": "afterDelay",
"workbench.colorTheme": "Visual Studio Light",
"cSpell.userWords": [
"Kubernetes",
"addin",
"kubectl",
"nuget"
],
"workbench.iconTheme": "material-icon-theme",
@jamesrcounts
jamesrcounts / boxstarter.ps1
Created Jan 9, 2019 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@jamesrcounts
jamesrcounts / 0.py
Created Jun 11, 2015
Python Challenge 0
View 0.py
url = "http://www.pythonchallenge.com/pc/def/%s.html"
print(url % 2**38)
@jamesrcounts
jamesrcounts / starter.cmd
Last active Mar 11, 2019
Boxstarter: Windows 10
View starter.cmd
# http://boxstarter.org/package/url?
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-WindowsOptionalFeature -Online -FeatureName containers –All
choco install Microsoft-Hyper-V-All -source windowsFeatures
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
@jamesrcounts
jamesrcounts / TortoiseReporter.py
Created Jun 5, 2015
Tortise Text Reporter for Python
View TortoiseReporter.py
from subprocess import call
from approvaltests.Reporter import Reporter
class TortoiseTextReporter(Reporter):
@staticmethod
def get_command(approved_path, received_path):
return ['C:\\Program Files\\TortoiseSVN\\bin\\tortoisemerge.exe', received_path, approved_path]
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=$HOME/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.com/install.sh | sh
@jamesrcounts
jamesrcounts / RecursiveSquare.java
Created Apr 16, 2015
Recursive Square Attempt
View RecursiveSquare.java
package org.teachingkidsprogramming.section05recursion;
import org.teachingextensions.logo.Tortoise;
public class RecursiveSquare
{
public static void main(String[] args) throws Exception
{
Tortoise.setSpeed(10);
double length = 100.0;
@jamesrcounts
jamesrcounts / starter.cmd
Created Mar 30, 2015
Minimal box starter
View starter.cmd
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
choco install googlechrome
Install-WindowsUpdate
Set-ExecutionPolicy -Force Unrestricted
You can’t perform that action at this time.