Skip to content

Instantly share code, notes, and snippets.

create table "Tickers_Data"
(
ticker integer not null
constraint tickers_data_ticker_foreign
references "Tickers",
time date not null,
low double precision not null,
high double precision not null,
open double precision not null,
close double precision not null,
@AveYo
AveYo / .Files.bat
Last active October 13, 2024 00:43
Files.html listing from directory context-menu ( or simpler, but less fancy Files.xml )
;@echo off &title Files.html listing from directory context-menu by AveYo v1.0
;if not exist "%~1" ( goto :setup ) else pushd "%~1\.." &echo Listing "%~1" - please wait... &set "fn=%~nx1 Files.html"
;del /f/q "%fn%" >nul 2>nul &cd.>"%fn%" 2>nul
;if exist "%fn%" ( set "files=%CD%\%fn%" ) else set "files=%USERPROFILE%\Desktop\%fn%"
;pushd "%~1"
;set "ampersand=&" &set "escape=&"
;> "%files%" findstr -bv ; "%~f0"
;>>"%files%" echo ^<p^>%DATE%, %TIME%^</p^>^<div class="filetree"^>
;>>"%files%" <nul set/p="<ul class="main-tree"><li class="tree-title">%~1</li>"
;>>"%files%" echo.
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 4, 2025 11:53
set -e, -u, -o, -x pipefail explanation
@ccy
ccy / delphi.async.md
Last active December 21, 2023 01:57

DEPRECATED: Refer to delphi-ppl

UI design strategy for long running task

A long running task may cause the application runtime become unresponsive and lead perception of application halt or hang during the operation.

For example:

  1. A database backup operation spend 10 minutes to finish.
  2. Perform length report calculation
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 30, 2025 05:20
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
package eu.janbednar.stackoverflow.camelTest;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Assert;
import org.junit.Test;
@mikybars
mikybars / .gitlab-ci.yml
Last active February 8, 2022 10:05
Maven & GitLab CI setup to deploy to a Nexus server
variables:
NEXUS_URL: XXX
NEXUS_USER: XXX
NEXUS_PWD: XXX
SNAPSHOT_DEPLOYMENT_REPOSITORY: ${NEXUS_URL}/repository/maven-snapshots/
RELEASE_DEPLOYMENT_REPOSITORY: ${NEXUS_URL}/repository/maven-releases/
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode --errors --fail-at-end --show-version"
MAVEN_CLI_POST_OPTS: "-Dnexus.url=${NEXUS_URL} -Dmaven.repo.local=.m2"
deploy:
@geerlingguy
geerlingguy / docker-compose-test.sh
Created March 15, 2020 01:54
Docker Compose exposed port test
# Create test VM with Vagrant.
mkdir testvm && cd testvm
vagrant init geerlingguy/ubuntu1804
# (Edit created Vagrantfile and uncomment `config.vm.network "private_network"` line)
# Start the VM and log in.
vagrant up
vagrant ssh
# Flush iptables rules (allow access to any port).
#!/bin/sh
# source https://community.synology.com/enu/forum/1/post/131600
echo "-- START ($(date +%Y%m%d_%H%M%S)) --"
#### TO UPDATE BEFORE RUN ####
DOCKER_BIN_VERSION=19.03.8
DOCKER_COMPOSE_VERSION=1.25.5
##############################
@MichaelBelgium
MichaelBelgium / wsl2-hosts-sync.ps1
Created June 5, 2020 07:46
WSL v2 windows hosts sync (powershell - updates domains to wsl2 ip)
# Requires -RunAsAdministrator
# Only works for WSL v2, this is completely not needed for WSL v1 where u always can use 127.0.0.1 in hosts file
Clear-Host
if ((Get-InstalledModule "Carbon" -ErrorAction SilentlyContinue) -eq $null) {
Install-Module -Name 'Carbon' -AllowClobber
}
Import-Module 'Carbon'