Skip to content

Instantly share code, notes, and snippets.

View solrevdev's full-sized avatar
💭
🤓

John Smith solrevdev

💭
🤓
View GitHub Profile
@solrevdev
solrevdev / libman.json
Created January 31, 2020 11:58
upgrades bootstrap and jquery in asp.net core 3.1 with libman
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": [
{
"library": "[email protected]",
"destination": "wwwroot/lib/font-awesome/"
},
{
"library": "[email protected]",
@solrevdev
solrevdev / Program.cs
Last active January 30, 2020 13:35
.NET Timer with CancellationToken support
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace tempy
{
public static class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
@solrevdev
solrevdev / TimerTest.cs
Last active January 27, 2020 17:44
A System.Theading.Timer example that waits for a long running process to finish
using System;
using System.Threading;
public class TimerTest : IDisposable
{
private readonly Timer _timer;
private readonly object _locker = new object();
public TimerTest()
{
@solrevdev
solrevdev / fonts.json
Last active May 8, 2020 09:00
current vscode fonts
{
"editor.fontFamily": "'Anonymous Pro','Liberation Mono', SFMono-Regular, Consolas, 'Dank Mono','Fira Code','Source Code Pro', Menlo, Monaco, 'Courier New', monospace",
}
@solrevdev
solrevdev / index.html
Last active October 26, 2024 20:32
Vue.js - gistpad - display local police info
<div id="app">
<h2>Police data for Oxfordshire</h2>
<p>Using data from <a href="https://data.police.uk/docs/method/crime-street/">https://data.police.uk/docs/method/crime-street/</a></p>
<p>Built using <a href="https://vuejs.org/">vue.js</a> and <a href="https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs">gistpad</a></p>
<p>Dataset source <a href="https://data.police.uk/api/crimes-street/all-crime?poly=51.85110973276099,%20-1.4057047320491165:51.86298424914946,%20-1.1282999468928665:51.71262569681858,%20-1.1241800738459915:51.70241375059155,%20-1.3905985308772415:51.850261433101906,%20-1.4043314410334915">https://data.police.uk/api/crimes-street/all-crime?poly=51.85110973276099,%20-1.4057047320491165:51.86298424914946,%20-1.1282999468928665:51.71262569681858,%20-1.1241800738459915:51.70241375059155,%20-1.3905985308772415:51.850261433101906,%20-1.4043314410334915</a></p>
<p>Sample data: <a href="sample.json">sample.json</a></p>
<button @click="clearData">Clear data<
@solrevdev
solrevdev / blog-post-sample.md
Last active March 5, 2020 12:02
an example solrevdev blog post
published layout title author tags
false
post
Upgrade bootstrap and jquery in ASP.NET Core 3.1 with libman
John Smith
aspnnetcore
dotnet
libman
bootstrap
jquery

https://slugify.online/

@solrevdev
solrevdev / cask_upgrade.sh
Created October 9, 2019 08:57
Script upgrading outdated brew casks
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
@solrevdev
solrevdev / bash_profile
Created September 30, 2019 17:07
bash_profile from ubuntu
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# custom terminal prompt
parse_git_branch() {
git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
@solrevdev
solrevdev / dotnet-script.csx
Last active September 11, 2019 13:19
dotnet script template
#!/usr/bin/env dotnet-script
Console.WriteLine("https://github.com/filipw/dotnet-script");
Console.WriteLine("dotnet tool install -g dotnet-script");
Console.WriteLine("dotnet script init");
Console.WriteLine("dotnet script main.csx");
@solrevdev
solrevdev / install-virtualbox-extensionpack.sh
Created August 18, 2019 15:17
install virtualbox extension pack from command line
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.10.vbox-extpack