-
Create an empty file to prevent the service from starting
sudo touch /etc/cloud/cloud-init.disabled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @ClarionDate INT = 47563 | |
DECLARE @SqlDateTime DATETIME | |
-- Convert the clarion DATE into and SQL DateTime | |
SET @SqlDateTime = DateAdd(day, @ClarionDate - 4, '1801-01-01') | |
SELECT @SqlDateTime AS 'SQL Date Time' | |
-- Now convert it back from and SQL DateTime to a Clarion Date | |
SET @ClarionDate = DateDiff(day, DateAdd(day, -4, '1801-01-01'), @SqlDateTime) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grid { margin:1em auto; border-collapse:collapse } | |
.grid td { | |
cursor:pointer; | |
width:30px; height:30px; | |
border:1px solid #ccc; | |
text-align:center; | |
font-family:sans-serif; font-size:13px | |
} | |
.grid td.clicked { | |
background-color:yellow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# based on script from http://www.axllent.org/docs/view/ssh-geoip | |
# License: WTFPL | |
# UPPERCASE space-separated country codes to ACCEPT | |
ALLOW_COUNTRIES="DE EU GB" | |
LOGDENY_FACILITY="authpriv.notice" | |
if [ $# -ne 1 ]; then | |
echo "Usage: `basename $0` <ip>" 1>&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
static class Program { | |
static void Main() { | |
Console.Write("Performing some task... "); | |
using (var progress = new ProgressBar()) { | |
for (int i = 0; i <= 100; i++) { | |
progress.Report((double) i / 100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; AutoHotkey Version: v1.1.22.06 | |
; Language: English | |
; Platform: Windows 10 | |
; Author: Andy Terra <github.com/airstrike> | |
; | |
; Script Function: | |
; Toggle Microphone Mute -- assumes it is located at WAVE:1, device #2 | |
; Use the SoundCardAnalysis script to figure out where your mic is | |
; https://www.autohotkey.com/docs/commands/SoundSet.htm#Ex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv | |
SetBatchLines, -1 | |
#MaxHotkeysPerInterval 200 | |
#Include <VA> | |
; Create the slider window | |
Gui, Add, Progress, w100 h20 x0 y0 Range0-100 vVolSlider, 0 | |
Gui, Add, Text, w100 h20 x0 y0 vVolText BackgroundTrans Center +0x200, 0 | |
Gui, +AlwaysOnTop -Caption +ToolWindow | |
Gui, Show, Hide w100 h20 x0 y0, Volume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="btn btn-primary" @onclick="@ModalShow">Show Dialog!</button> | |
@if (showModal) | |
{ | |
<div class="modal fade show" id="myModal" style="display:block" aria-modal="true" role="dialog"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<!-- Modal Header --> | |
<div class="modal-header"> |
Server-side Blazor is a stateful application framework. Most of the time, your users will maintain an ongoing connection to the server, and their state will be held in the server's memory in what's known as a "circuit". Examples of state held for a user's circuit include:
- The UI being rendered (i.e., the hierarchy of component instances and their most recent render output)
- The values of any fields and properties in component instances
- Data held in DI service instances that are scoped to the circuit
Occasionally, users may experience a temporary network connection loss, after which Blazor will attempt to reconnect them to their original circuit so they can continue.
OlderNewer