Skip to content

Instantly share code, notes, and snippets.

Avatar

Charles P Oliver cpoliver

View GitHub Profile
@cpoliver
cpoliver / generated.ts
Last active Oct 14, 2020
openapi-typescript-codegen at sign bug
View generated.ts
/* 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 Feb 8, 2018 — forked from mkoura/vpn-toggle
script for starting/stopping vpn using Network Manager on Linux - can be used via keyboard shortcut
View vpn-toggle
#!/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 Jan 15, 2018
VS Code Casumo Temp
View test.json
{
"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 Sep 5, 2017
BetterTouchTool Spotify Script
View btt_spotify.applescript
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
View PR Template.md

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 Aug 28, 2017
All The Things - Install Script WIP
View .all-the-things.txt
# 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 Nov 3, 2016 — 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).
View .eslintrc
{
// 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
View Atom Sync Settings
# 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 Aug 27, 2016
fetch to parse rss via (now deprecated) Google Feeds API
View parse-rss-as-json.js
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)
You can’t perform that action at this time.