Skip to content

Instantly share code, notes, and snippets.

[xml]$xmlFile = get-content 'C:\Users\imoore\Desktop\SomeCompany.SomeProject.xml'
$rootNamespace = 'SomeCompany.SomeProject.'
$word = New-Object -ComObject Word.Application
$document = $word.Documents.Add()
$selection = $word.Selection
$selection.Style = 'Heading 1'
$selection.TypeText('Project Plugins')
$taskName = 'ForceClockSynchronization'
$trigger = new-scheduledtasktrigger `
-once `
-at (get-date) `
-RepetitionInterval (New-TimeSpan -Hours 1) `
-RepetitionDuration ([system.timespan]::MaxValue)
$stopService = new-scheduledtaskaction `
-execute net `
source ~/.bash/git-prompt.sh # Show git branch name
export GIT_PS1_SHOWCOLORHINTS=true # Show branch name in color
# Prompt
export PROMPT_COMMAND='__git_ps1 "\e[37m[\t] \e[33m\w\e[0m" "\e[92m\n\\\$\e[0m "'
# Modify PATH
export PATH=~/bin:~/.local/bin:$PATH
@ian-moore
ian-moore / setup
Last active June 15, 2018 14:30
setup windows subsystem linux (ubuntu 18) with node/npm/java/clojure
#!/usr/bin/env bash
# Ensure this file is executable via `chmod a+x setup`
# create .bash_profile
mkdir ~/bin
mkdir ~/.bash
wget -O ~/.bash/git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
wget -O ~/.bash_profile https://gist.githubusercontent.com/ian-moore/7d13a5846350dfcd52674538898a0ca8/raw/b3490e824ce01dbeb6edc1a116b68bd7641a9772/.bash_profile

Keybase proof

I hereby claim:

  • I am ian-moore on github.
  • I am ianmoore (https://keybase.io/ianmoore) on keybase.
  • I have a public key ASCMwDSZoo9X9ixrfEP6LrCnj93JE-t-ga5sjrPT_touaQo

To claim this, I am signing this object:

@ian-moore
ian-moore / dev_server.clj
Created November 27, 2019 20:10
shadow-cljs dev http server with conditional proxy requests
(ns my-shadow-app.dev-server
(:require [clj-http.client :as client]
[clojure.string :as string]
[shadow.http.push-state :as push-state])
(:import [org.apache.http NoHttpResponseException]))
(defn handler
[{:keys [uri http-config body headers request-method] :as request}]
(if-not (string/starts-with? uri "/api")
(push-state/handle request)
@ian-moore
ian-moore / notes.md
Created January 17, 2020 16:13
use styled-components from npm with shadow-cljs and hx
  1. Install styled-components
npm install --save styled-components
  1. Require in your namespace
["styled-components" :default styled]