Skip to content

Instantly share code, notes, and snippets.

@mistificator
mistificator / HelloWorld.asm
Last active November 28, 2019 21:10
Zx Spectrum CP/M ASM test
; CP/M example
.org $100
ld hl, Message
call Print
call $0000 ; CP/M warm boot
Print:
ld a,(hl)
cp '$'
ret z
push hl
@mistificator
mistificator / HelloWorld.asm
Last active November 28, 2019 17:29
Zx Spectrum native ASM Test
.org $5CD2 ; // fixed origin for https://clrhome.org/asm/ TAP generator
#define ROM_PR_STRING $203C
#define ROM_OUT_NUM1 $1A1B
#define ROM_CHAN_OPEN $1601
#define ROM_CLS $0D6B
#define SYSVAR_7FFD_STATE $5B5C ;system variable that holds the last value output to 7FFDh, from https://www.worldofspectrum.org/ZXSpectrum128+3Manual/chapter8pt26.html
#define SYSVAR_1FFD_STATE $5B67 ;system variable that holds the last value output to 1FFDh, from http://www.hal.varese.it/filesmuseo/sinclair/spectrumfaq/tech_128.html
#define SYSVAR_LAST_K $5C08
redmine plugin install
1.
https://stackoverflow.com/a/4496648/2010648
Windows
As pointed by answers below, you can use SET instead
SET HTTP_PROXY=http://user:password@host:port
SET HTTPS_PROXY=%HTTP_PROXY%
{([^{}]*|(?R))*}
#!/bin/bash
while /bin/true; do
if ! [ "$(ping -c 1 $(hostname -i | cut -d\ -f2))" ]; then
sudo wicd-cli -zc
fi
sleep 1
done
#!/bin/sh
#sudo apt-get install lm-sensors
watch -n 0 "sensors && cat /proc/cpuinfo | grep MHz"
// from https://godotengine.org/qa/15718/how-to-change-a-specific-color-using-shaders
shader_type canvas_item;
void fragment()
{
vec4 curr_color = texture(TEXTURE, UV); // Get current color of pixel
if (curr_color == vec4(0, 0, 0, 1))
{
#!/bin/sh
if [ -x "$(command -v tput)" ]; then
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
fi
echo Welcome to ${green}Clean Debian${reset} - one-script Debian installer from recovery console.
echo Version 1.0
@mistificator
mistificator / logoff_all.cmd
Created June 29, 2019 11:37
Windows logoff for all users except current (EN & RU)
query session | findstr /c:"Disk" /c:"„ЁбЄ" | for /f "tokens=2" %%g in ('more') do logoff %%g
Dir | Rename-Item -NewName {$_.name -replace "old_filename_part", "new_filename_part"}