This file contains hidden or 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
package clipboard | |
import "core:c" | |
import "core:fmt" | |
import "core:strings" | |
import "vendor:x11/xlib" | |
clipboard_get :: proc() -> (clipboard: string, ok: bool) { | |
display := xlib.OpenDisplay(nil) | |
if display == nil do return clipboard, false |
This file contains hidden or 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
package main | |
import "core:fmt" | |
import "core:log" | |
import "core:mem" | |
import "core:net" | |
import "core:os" | |
main :: proc() { | |
args := os.args |
This file contains hidden or 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
#!/usr/bin/env bash | |
set +xe | |
test_cases=',1 3 5 4 6 "3 2" 7,8 1h 3,96 966 9666 99999999999999999999999999999999' | |
IFS=','; for test_case in ${test_cases[@]} | |
do | |
actual="$(timeout 1 ./push_swap $test_case 2>&1)" | |
expected="$(timeout 1 ./checker_OS $test_case 2>&1)" | |
if [[ $actual != $expected ]] |