Skip to content

Instantly share code, notes, and snippets.

@kasajian
kasajian / ide_requirements.md
Last active October 27, 2022 19:05
What I look for in an IDE

What I look for in an IDE

As someone who experiments with different programming languages and environments, the following are the requirements I look for in IDE integration, whether for Visual Studio Code, or another IDE.

Minimum

  1. "Run" command that runs a sample piece of code, given an entry point, and exits when it's done. Be able to do this multiple times, after making changes to the source in the editor.
  2. Run under a debugger. Place a break-point somewhere in the executation path, hit F5, and make sure it breaks there. Continuing after that, should go to the end and exit (not remain in the debugger)
  3. Run a set of tests.
  4. Place a breakpoint in any test or production code that's in the execution path of a test, run a set of tests (all tests), and hit the breakpoint on the first test that hits it.
@kasajian
kasajian / Positions.md
Last active October 7, 2021 01:11
Job posting
@kasajian
kasajian / Search my gists.md
Created July 19, 2021 06:31
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user kasajian.
user:kasajian

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@kasajian
kasajian / m3-downloader.bat
Created October 23, 2020 07:18 — forked from a-sync/m3-downloader.bat
m3 archívum URL vagy M3- ill. RADIO- azonosító alapján letölti a műsort youtube-dl segítségével
@if (@a==@b) @end /*
@echo off
setlocal
if "%~1"=="/?" goto usage
if %0 == "%~0" (
title m3-downloader.bat
set /p INPUT="ID/URL: "
) else (
set "INPUT=%~1"
@kasajian
kasajian / embedded_nodejs.bat
Created October 23, 2020 07:09 — forked from a-sync/embedded_nodejs.bat
A single batch file that downloads a nodejs binary and runs the code embedded in itself. (for windows 7 and above)
if ("0"=="1") /*
@echo off
set args=%*
setlocal ENABLEDELAYEDEXPANSION
if not exist %TEMP%\node.exe (
echo DOWNLOADING RUNTIME...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://nodejs.org/dist/latest/win-x64/node.exe', '%TEMP%\node.exe')"
echo DOWNLOAD COMPLETE!
)
@kasajian
kasajian / desktop ui technologies
Created January 23, 2020 22:03
desktop ui technologies
node:
native:
https://github.com/parro-it/libui-node
web:
https://github.com/GoogleChromeLabs/carlo
c/c++:
native:
https://github.com/andlabs/libui
web:
@kasajian
kasajian / C Promises.md
Last active October 23, 2020 09:38
promises

Promises

4557 We always imagine that a variable has a value. That is, as soon as a variable is created, it has some value, even if it's a default value. So if you have two variables, x and y, and you want to print the sum, you might code it this way:

WriteLine( x + y );

Now what if a variable's value doesn't exist right away, but will become available at some time in the future. The time in the future can be a long time, a short time or no time, but you don't know. The variable has a .Result property which will return the value, but blocking until the value is actually available. Let's say variable x is that type of a variable, so your code would now look like this:

WriteLine( x.Result + y );

@kasajian
kasajian / ApprovalTests.cpp
Last active October 23, 2020 08:21
Approval Tests CPP
#include "ApprovalTests.hpp"
#include <iostream>
void TestXyz()
{
try
{
TestName currentTest;
currentTest.setFileName(__FILE__);
currentTest.sections = { "TestXyz" };
@kasajian
kasajian / ValueObject.cs
Last active October 23, 2020 08:29
ValueObject
public class ConnectionString
{
public string Value { get; private set; }
public ConnectionString(string value)
{
Value = value;
}
public static implicit operator string(ConnectionString connectionString)
@kasajian
kasajian / m.c
Created October 5, 2017 20:27
ASCII image of the Mandelbrot set
main (n)
{
float r, i, R, I, b;
for (i = -1; i < 1; i += .06, puts (""))
for (r = -2; I = i, (R = r) < 1; r += .03, putchar (n + 31))
for (n = 0; b = I * I, 26 > n++ && R * R + b < 4;
I = 2 * R * I + i, R = R * R - b + r);
}