Skip to content

Instantly share code, notes, and snippets.

@sbosell
sbosell / InstallSoftware.ps1
Created September 9, 2023 00:40 — forked from dougwaldron/InstallSoftware.ps1
Install software with winget / automate installation with PowerShell
# 1. Make sure the Microsoft App Installer is installed:
# https://www.microsoft.com/en-us/p/app-installer/9nblggh4nns1
# 2. Edit the list of apps to install.
# 3. Run this script as administrator.
Write-Output "Installing Apps"
$apps = @(
@{name = "7zip.7zip" },
@{name = "Adobe.Acrobat.Reader.64-bit" },
@{name = "Axosoft.GitKraken" },
@sbosell
sbosell / recaptcha.dart
Created September 29, 2020 12:28
recapthca3 and flutter web
@JS()
library grecaptcha;
import 'package:js/js.dart';
import 'package:js/js_util.dart';
@JS()
@anonymous
class Options {
external String get action;
@sbosell
sbosell / polling.dart
Last active September 25, 2020 04:07
Long Polling Stream and Need to Cancel Timer
// The focus on/off methods fire. I am not sure how to change the providers so that I can either force dispose or just start/stop the timer?
final MyRequestProvider =
StreamProvider.autoDispose<List<MyRequest>>((ref) {
StreamController<List<MyRequest>> controller =
StreamController<List<MyRequest>>();
ClientResolver clientResolver = ClientResolver();
IServiceClient client = clientResolver.getClient(AppParameters.getBaseUrl());
@sbosell
sbosell / network_detector_notifier.dart
Created September 22, 2020 11:50
Riverpod Network Detection Example
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
enum NetworkStatus { NotDetermined, On, Off }
class NetworkDetectorNotifier extends StateNotifier<NetworkStatus> {
StreamController<ConnectivityResult> controller =
@sbosell
sbosell / setup.html
Last active October 20, 2018 16:35
service-stack-kendo-grid-vue-html-setup
<!--Load Kendo styles from the Kendo CDN service-->
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.3.913/styles/kendo.common.min.css"/>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.3.913/styles/kendo.default.min.css"/>
<!--Load the required libraries - jQuery, Kendo, Babel and Vue-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="https://kendo.cdn.telerik.com/2018.3.1017/js/kendo.all.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="https://unpkg.com/@progress/kendo-data-query@1.5.0/dist/cdn/main.js"></script>
<script src="https://unpkg.com/@progress/kendo-datasource-vue-wrapper/dist/cdn/kendo-datasource-vue-wrapper.js"></script>
@sbosell
sbosell / main.cs
Last active January 18, 2018 01:10
OrmLite Filter Transaction
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
using System.Data;
using System;
var dbFactory = new OrmLiteConnectionFactory(":memory:", SqliteDialect.Provider);
@sbosell
sbosell / test.cs
Created January 11, 2017 19:45
TextAbsorber Example
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("Speaker.FullName");
textFragmentAbsorber.TextSearchOptions.IsRegularExpressionUsed = false;
//accept the absorber for all the pages
file.Document.Pages.Accept(textFragmentAbsorber);
//get the extracted text fragments
TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;
//loop through the fragments
foreach (TextFragment textFragment in textFragmentCollection)
@sbosell
sbosell / program.cs
Created December 22, 2016 15:06
Hangfire DisableConcurrentExecutionWithParameters Test
using Hangfire;
using Hangfire.Client;
using Hangfire.Common;
using Hangfire.Server;
using Hangfire.Storage;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Security.Cryptography;
using Lucuma;
using Lucuma.Libs;
using Lucuma.Libs.Config;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
# This script will clone the settings from one project to another via an exported YAML
$apiUrl = 'https://ci.appveyor.com/api'
$token = '[your token]'
$headers = @{
"Authorization" = "Bearer $token"
"Content-type" = "application/json"
}
$accountName = '[account name]'
$projectSlug = '[project slug]'