Skip to content

Instantly share code, notes, and snippets.

View slash3b's full-sized avatar

ilya slash3b

View GitHub Profile
@slash3b
slash3b / 32.asm
Created January 3, 2025 14:13 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@slash3b
slash3b / slices.go
Created April 26, 2024 10:21
Go slices mind-twister
firstSlice := []string{"a", "b", "c", "d", "e", "f"}
firstSlice = firstSlice[:5]
secondSlice := firstSlice
firstSlice = append(firstSlice, "g")
// This will print: [a b c d e g]
fmt.Println(firstSlice)
secondSlice = append(secondSlice, "h")
@slash3b
slash3b / note.md
Created September 3, 2023 09:58 — forked from wheeskers/note.md
Disable wakeup for device using systemd

Check devices

# cat /proc/acpi/wakeup

Find specific devices

Examples:

@slash3b
slash3b / _roles.txt
Created June 23, 2022 14:00 — forked from lizthegrey/_roles.txt
Lizzes' hardware
lily: main amd64 workstation used primarily for gaming, secondarily for work
daisy: main arm64 workstation used primarily for work
foxglove: secondary amd64 workstation used for recording videos, streams, podcasts, etc. in a soundproof booth -- or for quiet focus time
@slash3b
slash3b / symfony.phpunit.xml
Created October 30, 2016 08:41 — forked from havvg/symfony.phpunit.xml
An example PHPUnit configuration file for symfony projects running on 512MB phpUnderControl server
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="true">
<filter>
<blacklist>
set -g default-terminal "screen-256color"
# change prefix command to C-z
set -g prefix C-z
unbind C-b
bind C-z last-window
bind z send-prefix
# setup | and - for window splitting
unbind %
bind | split-window -h