Skip to content

Instantly share code, notes, and snippets.

View CJKinni's full-sized avatar
👋
Hi!

Christine Kinniburgh CJKinni

👋
Hi!
View GitHub Profile
@CJKinni
CJKinni / app.py
Last active January 13, 2022 16:53
A Wordle TUI implementation using Textual
import random
from typing import List
from textual import events
from textual.app import App
from textual_inputs import TextInput
class CharInput(TextInput):
"""A text input that only takes one character"""
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
@CJKinni
CJKinni / boxstarter.ps1
Last active December 31, 2020 03:18
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Chris Kinniburgh <[email protected]>
# Based heavily on https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# by Jess Frazelle
# Last Updated: 2017-12-31
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
@CJKinni
CJKinni / parsing_steam_xml.md
Last active July 12, 2017 16:05
My thought process when learning a new language.

Here's a little more help feeling it out, from someone who knows like no python but has some dev experience. Forgive me if this is too simplistic, but since you're starting out, it might be helpful.

My thought process going into a project like this is this:

What is the smallest chunk of this I can do in one logical step? Well I have an XML url I can go to to get a list of games. So I'm going to need to get that into my program. That's step one. And it is all I care about. So how do I do it?

There are really two steps here:

  1. Read the data from the url Kane provided.
  2. Parse the xml, turning it into something you can use in the rest of your code.

Keybase proof

I hereby claim:

  • I am cjkinni on github.
  • I am cjkinni (https://keybase.io/cjkinni) on keybase.
  • I have a public key ASBi31W5R331lG2Nu_RqRR6T8L3RjWnWgYwsWozm59NoJgo

To claim this, I am signing this object:

// ==UserScript==
// @name Morrichris
// @namespace cjk_cnc
// @description Swap Chris Thursten's Fase with Morrichris
// @include http://www.pcgamer.com/*
// @version 1
// @grant none
// ==/UserScript==
if (document.getElementsByClassName("author-block")[0].children[0].getAttribute('href') == "http://www.pcgamer.com/author/chris-thursten/"){
@CJKinni
CJKinni / Setup
Last active August 29, 2015 14:22
PowerShell Setup Script
# Basic PC Setup - Choco Version
set-executionpolicy unrestricted -s CurrentUser
Y
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
choco install powershell -y
choco install sublimetext3 -y
choco install notepadplusplus.install -y
@CJKinni
CJKinni / pre-commit
Last active August 29, 2015 14:15
Chrome Extension auto-increment version number and zip extension on commit via git hooks
#!/usr/bin/env ruby
require 'json'
filename = './manifest.json'
text = File.read(filename)
json = JSON.parse(text)
oldVersion = json['version']
@CJKinni
CJKinni / AnagramSolver.rb
Created August 8, 2012 20:39
Anagram Solver
#/usr/bin/ruby
## Name data from http://www.ssa.gov/oact/babynames/limits.html
## Originally used on 8 Aug to find an anagram of a name. Neural.
FILENAME = "/Users/ckinniburgh/Dropbox/Development/AnagramSolver/yob1991.txt"
puts "Input anagram: "
STDOUT.flush
anagram = gets.chomp