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
$ip = | |
$topic = | |
$delay = 30 | |
while ($true) { | |
$pingResult = Test-Connection -ComputerName $ip -Count 1 -Quiet | |
if ($pingResult) { | |
Write-Host "done" | |
Invoke-RestMethod ` | |
-Method 'Post' ` |
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
defmodule MyWeb.FormsComponent do | |
use Surface.Component | |
alias Surface.Components.Context | |
alias Surface.Components.Form.{Field, Label, TextInput} | |
def render(assigns) do | |
~F""" | |
<Context get={form: form}> | |
<Field name={:thing}> | |
<Label text="Thing" form={form} /> |
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
defmodule WxInclude do | |
@moduledoc """ | |
Creates functions for all the `wx` constants in `wx/include/wx.hrl`. | |
Function names match the constants except for the key codes, which we prepend `wx` onto, such that `WXK_NONE` becomes `wxWXK_NONE()` | |
## Usage | |
defmodule MyApp.Ui do | |
use Bitwise, only_operators: true |
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
// from: https://www.reddit.com/r/fsharp/comments/haqfid/im_a_c_enthusiast_please_sell_me_f_in_what_areas/ | |
// I tend to use the following convention when ordering function parameters: | |
let fooFactory (dep1,dep2,...) (arg1,arg2,...) (this:Bar) = | |
//Then use it like: | |
let fooer = fooFactory (dep1,dep2,...) | |
let bar = new Bar() |
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
DATE | TIME | A | B | C | |
---|---|---|---|---|---|
10/04/2020 | 8:00:00 AM | 120 | 1.42 | 1.13 | |
10/04/2020 | 8:00:10 AM | 119 | 1.41 | 1.14 | |
10/04/2020 | 8:00:20 AM | 118.4 | 1.41 | 1.14 | |
10/04/2020 | 8:00:30 AM | 117.6 | 1.41 | 1.14 | |
10/04/2020 | 8:00:40 AM | 116.9 | 1.41 | 1.14 | |
10/04/2020 | 8:00:50 AM | 116 | 1.41 | 1.14 | |
10/04/2020 | 8:01:00 AM | 115.2 | 1.402 | 1.132 | |
10/04/2020 | 8:01:10 AM | 114.5 | 1.4 | 1.13 | |
10/04/2020 | 8:01:20 AM | 113.7 | 1.4 | 1.13 |
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
// done using Akka.Net v1.4 pre-release | |
// will send messages back and forth forever | |
// paket.dependencies | |
// ------------------ | |
// | |
// source https://api.nuget.org/v3/index.json | |
// | |
// storage: none | |
// framework: netcoreapp3.1, netstandard2.0, netstandard2.1 |
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
@echoStopping the Citect Runtimest . . . | |
@echo ---- | |
@echo -- | |
@echo ------ | |
@taskkill /F /IM Citect32.exe | |
timeout /t 5 | |
@echo -- | |
@taskkill /F /IM Citect32.exe | |
timeout /t 5 | |
@echo -- |
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
# it was discovered that Citect was not updating all the projects when running | |
# "Update project and all included projects" | |
# TODO: add logging | |
import win32api | |
import time | |
import win32com.client | |
from pywintypes import com_error |
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
# import projects into PCM that were backed up to <PROJECT>_<VER>.ZIP | |
# from the getAllVersions.vb Scheduler script | |
# can also rename projects on the way | |
# useful when migrating from VSS to SVN | |
import sys | |
from pathlib import Path | |
from shutil import make_archive, unpack_archive, copy2 | |
import re | |
from xml.etree.ElementTree import ParseError, parse |
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
'********************************************************************************* | |
' Product Module : Scheduler Scripts | |
' Script Name : getAllVersions.vb | |
' Function : Backup each version of a Machine Edition project and its history | |
' file. Designed to be used in conjunction with proficy_import.py | |
' script when migrating from VSS to SVN. | |
' retreives <projectname>_<version>.zip and <projectname>_history.xml | |
' for all projects selected in a manually triggered Scheduler Event. | |
' | |
' Change BackupFolder to the location of the project backup files. |
NewerOlder