Skip to content

Instantly share code, notes, and snippets.

View andrzejsliwa's full-sized avatar

Andrzej Śliwa andrzejsliwa

View GitHub Profile
@andrzejsliwa
andrzejsliwa / fix-wsl2-dns-resolution
Created April 17, 2024 07:01 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
#include <c64.h>
#include <stdio.h>
unsigned byte* const SCREEN = (char*)$0400;
void main() {
fillscreen(SCREEN, $20);
charset();
}
[~/c64_learning]$ ./gradlew test rvm:ruby-2.6.6
> Task :downloadDeps
Unable to get progress logger. Download progress will not be displayed.
Unable to get progress logger. Download progress will not be displayed.
Unable to get progress logger. Download progress will not be displayed.
Unable to get progress logger. Download progress will not be displayed.
Unable to get progress logger. Download progress will not be displayed.
> Task :asmSpec
[~/c64_learning]$ x64 -warp -autostart /Users/andrzejsliwa/c64_learning/spec/example.spec.prg -console -jamaction 5 -autostartprgmode 0 -moncommands /Users/andrzejsliwa/c64_learning/spec/example.spec.vs -chdir /Users/andrzejsliwa/c64_learning/spec
opening dynamic library libavformat.57.dylib failed! error: dlopen(libavformat.57.dylib, 5): image not found
*** VICE Version 3.1 ***
OS compiled for: MacOS Sierra (10.12)
GUI compiled for: SDL2
CPU compiled for: x86_64
Compiler used: clang 8.1.0
Current OS: *nix
Current CPU: Intel Pentium Pro/II/III/Celeron/Core/Core 2/Atom
@andrzejsliwa
andrzejsliwa / Database.fs
Last active March 3, 2022 00:29
Example of proper referencing of FSharp.Data.Npqsql to be able use it from FSI (in project running on dotnetcore)
module Database
open FSharp.Data
open FSharp.Data.Npgsql
[<Literal>]
let example = "Host=localhost;Username=postgres;Database=example;Port=5432"
type Example = NpgsqlConnection<example>
@andrzejsliwa
andrzejsliwa / README
Created August 24, 2012 18:17 — forked from fwangel/README
Seven Languages in Seven Weeks: Erlang
What is Erlang?
"Erlang is a declarative, dynamically-typed, functional, concurrent, distributed and fault-tolerant programming language with garbage collection and code hot-swapping built into its runtime."
"Let it crash!"
- Erlang was designed to build software that "never" stops, i.e. at least 99.999% uptime.
- Erlang programmers concentrate on coding for the correct case and crashing on failure.
- Robustness is achieved by having programmers concentrate on processes and the interactions (or messages) between them.
- Early error detection/recovery and the use of concurrent programming techniques lets you build fault tolerant systems.
- COP: Concurrency-Oriented Programming
@andrzejsliwa
andrzejsliwa / embedded.md
Created September 11, 2012 21:48
Ranch User Guide WIP

Embedded mode

Purpose

Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.

@andrzejsliwa
andrzejsliwa / proc_tree.escript
Last active July 6, 2020 14:35 — forked from eiri/proc_tree.escript
Walks erlang VM's process tree and prints PlantUML diagram of it on a standard output
#!/usr/bin/env escript
%% -*- erlang -*-
%%! -hidden -setcookie cookie
-mode(compile).
main(["-?"]) ->
usage();
main(Args) ->
case get_pid(Args) of
@andrzejsliwa
andrzejsliwa / Gemfile
Created June 25, 2020 10:37 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers