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
// Hello World Window macOS Swift 4: Creates an empty window | |
import AppKit | |
let nsapp = NSApplication.shared | |
let rect = NSMakeRect(0, 0, 200, 200) | |
if #available(macOS 10.10, *) { | |
let window = NSWindow(contentRect: rect, | |
styleMask: .fullSizeContentView, | |
backing: NSWindow.BackingStoreType.buffered, |
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
func a() { | |
print("a") | |
} | |
func b() { | |
print("b") | |
} | |
func c() { | |
print("c") |
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
Basically a hello world for using the Ptex API for writing quad face. | |
The second example writes random colors to triangle meshes. |
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
find -name \*.swift -exec perl -pi -e "s/bla/laber/g" {} \; |
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
#include <iostream> | |
// CRTP aka static polymorphism | |
using namespace std; | |
template<typename T> class Base { | |
public: | |
void bla() { | |
auto derived = static_cast<T&>(*this); |
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
#include <iostream> | |
using namespace std; | |
class A { | |
public: | |
void a() { cout << "a" << endl; } | |
}; | |
template<typename T> struct Mixin: T { |
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
find . -name \*.mp3 | parallel -q ffmpeg -i {} -c:a libopus -b:a 20k {.}.opus |
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
diff -u -r nvidia-530.30.02/nvidia/nv-mmap.c /home/gonsolo/nvidia-530.30.02/nvidia/nv-mmap.c | |
--- nvidia-530.30.02/nvidia/nv-mmap.c 2023-02-22 05:37:36.000000000 +0100 | |
+++ /home/gonsolo/nvidia-530.30.02/nvidia/nv-mmap.c 2023-05-24 18:49:07.797789349 +0200 | |
@@ -458,7 +458,7 @@ | |
} | |
// Needed for the linux kernel for mapping compound pages | |
- vma->vm_flags |= VM_MIXEDMAP; | |
+ vm_flags_set(vma, VM_MIXEDMAP); | |
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
As of April 2024: | |
1. Vivado: Do not run installLibs.sh, manually add libs from script, libtinfo.so.5 can be symlinked | |
2. XDMA: | |
- For kernel 6.8.x: Use updated driver from https://github.com/gonsolo/dma_ip_drivers.git branch gonsolo. | |
- "config bar not found": Start kernel with "pci=nomsi", insmod with "poll_mode=1 interrupt_mode=2". | |
- After that you should have some devices: /dev/xdma*. |
OlderNewer