Skip to content

Instantly share code, notes, and snippets.

View denolfe's full-sized avatar

Elliot DeNolf denolfe

View GitHub Profile
@denolfe
denolfe / pixelbook-linux-setup.md
Last active August 19, 2022 21:19
Notes on setting up Pixelbook with Linux apps

Pixelbook Linux Setup

Chromebook Configuration

  • Enable Linux Apps
    • Open drawer in bottom right and click gear icon
    • Scroll down to find Linux Apps or Linux (Beta) and select TURN ON
    • After the install runs, you should have an application in ChromeOS called Terminal

Initial setup of container

@denolfe
denolfe / jqueryConsole.js
Created May 1, 2015 21:35
Snippet to include jQuery in Chrome Dev Tools
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type.
jQuery.noConflict();
sv_cheats 1
sv_infinite_ammo 1
mp_startmoney 16000
mp_round_restart_delay 0
mp_freezetime 0
mp_buytime 3600
mp_maxmoney 99999
mp_friendlyfire 0
mp_give_player_c4 0
mp_roundtime 20
@denolfe
denolfe / JS-LINQ.js
Created July 17, 2018 14:15 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }
@denolfe
denolfe / snsToSlack.js
Created April 27, 2018 21:35 — forked from terranware/snsToSlack.js
AWS Lambda function to Slack Channel hookup
var https = require('https');
var util = require('util');
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
var postData = {
"channel": "#aws-sns",
"username": "AWS SNS via Lamda :: DevQa Cloud",
@denolfe
denolfe / snip.sh
Created April 9, 2018 17:50 — forked from mgoellnitz/snip.sh
GitLab Snippet Command Line Tool
#!/bin/bash
#
# Copyright 2016-2017 Martin Goellnitz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@denolfe
denolfe / install-go.ps1
Last active February 2, 2018 17:12 — forked from andrewkroh/install-go.ps1
Install Golang using Powershell
# Installs golang on Windows.
#
# # Run script:
# .\install-go.ps1 -version 1.9.3
#
# # Download and run script:
# $env:GOVERSION = '1.9.3'
# iex ((new-object net.webclient).DownloadString('SCRIPT_URL_HERE'))
Param(
[String]$version,
@denolfe
denolfe / Move-Nested-Files-To-Top-Level.ps1
Last active January 31, 2018 19:11
Move nested files to top level directory #Snippet
Get-ChildItem -Path C:\Packages -Recurse -Filter *.nupkg | Copy-Item -Destination C:\Packages -Force
@denolfe
denolfe / ps-download-all-nuget-packages
Created January 31, 2018 18:00 — forked from bevand/ps-download-all-nuget-packages
Powershell script to download all packages from a nuget feed
$destinationDirectory = "C:\LocalNuGetTest\"
$webClient = New-Object System.Net.WebClient
$webClient.Credentials = New-Object System.Net.NetworkCredential("USERNAME", "PASSWORD")
$feed =[xml]$webClient.DownloadString("https://hostednugetfeed.com/custom-feed/nuget/v2/Packages")
$records = $feed | select -ExpandProperty feed | select -ExpandProperty entry #| select -ExpandProperty content
for ($i=0; $i -lt $records.Length; $i++) {
$content = $records[$i] | select -ExpandProperty content
$properties = $records[$i] | select -ExpandProperty properties
@denolfe
denolfe / DynamicJsonDeserializer.cs
Last active January 9, 2018 20:23 — forked from rdingwall/DynamicJsonDeserializer.cs
RestSharp deserialize JSON to dynamic #snippet
// ReSharper disable CheckNamespace
namespace RestSharp.Deserializers
// ReSharper restore CheckNamespace
{
public class DynamicJsonDeserializer : IDeserializer
{
public string RootElement { get; set; }
public string Namespace { get; set; }
public string DateFormat { get; set; }