Skip to content

Instantly share code, notes, and snippets.

View cpoliver's full-sized avatar

Charles P Oliver cpoliver

View GitHub Profile
@cpoliver
cpoliver / generated.ts
Last active October 14, 2020 11:30
openapi-typescript-codegen at sign bug
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Application } from '../models/Application';
import { request as __request } from '../core/request';
export class ApplicationsService {
/**
* Gets all Applications.
@cpoliver
cpoliver / vpn-toggle
Last active February 8, 2018 08:22 — forked from mkoura/vpn-toggle
script for starting/stopping vpn using Network Manager on Linux - can be used via keyboard shortcut
#!/bin/sh
# list of configured VPNs: `nmcli con show | grep vpn`
uuid="049b2d60-b816-4640-b33e-659920598c19"
active_uuid=''
for r in $(nmcli -t -f UUID,TYPE con show --active); do
ctype="${r##*:}"
if [ "$ctype" = 'vpn' ]; then
@cpoliver
cpoliver / test.json
Created January 15, 2018 11:53
VS Code Casumo Temp
{
"vim.disableAnnoyingNeovimMessage": true,
"extensions.ignoreRecommendations": false,
"editor.fontFamily": "Operator Mono",
"javascript.validate.enable": false,
"editor.tabSize": 2,
"editor.renderWhitespace": "boundary",
"editor.cursorStyle": "underline",
"editor.insertSpaces": true,
"files.exclude": {
@cpoliver
cpoliver / btt_spotify.applescript
Created September 5, 2017 12:04
BetterTouchTool Spotify Script
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
if is_running("Spotify") then
tell application "Spotify"
set currentArtist to artist of current track as string
set currentTrack to name of current track as string
return currentArtist & " - " & currentTrack

Description

{description}

Related Issue

{link to issue tracking card}

Motivation and Context

{background}

How Has This Been Tested?

@cpoliver
cpoliver / .all-the-things.txt
Last active August 28, 2017 06:58
All The Things - Install Script WIP
# zshell
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# TODO: create and pull my dotfiles repo
# homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# homebrew packages
brew install
@cpoliver
cpoliver / .eslintrc
Created November 3, 2016 17:35 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@cpoliver
cpoliver / parse-rss-as-json.js
Created August 27, 2016 03:02
fetch to parse rss via (now deprecated) Google Feeds API
const entryCount = 2;
const corsProxyUrl = 'https://crossorigin.me';
const feedUrl = 'http://feeds.bbci.co.uk/news/world/rss.xml';
const googleUrl = `http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=${feedUrl}&num=${entryCount}`;
const url = `${corsProxyUrl}/${googleUrl}`;
const logFeeds = response => response.responseData.feed.entries.map(console.log);
fetch(url)