Skip to content

Instantly share code, notes, and snippets.

View alberic89's full-sized avatar
🐧

alberic89

🐧
  • Entre mon clavier et ma chaise.
View GitHub Profile
"b",
"i",
"u",
"s",
"sup",
"sub",
"color",
"left",
"center",
"right",
@alberic89
alberic89 / filetypes.ZigBasicSupport.conf
Created April 6, 2024 14:27
Basic support of Zig for Geany (from user00e00/geany4zig who was deleted, and a little improved)
# best-effort support for zig with a single configuration file: Syntax highlighting and symbol detection for functions only.
# For complete documentation of this file, please see Geany's main documentation
[styling=C]
# Edit these in the colorscheme .conf file instead
[keywords]
# all items must be in one line
primary=align allowzero and anyerror anytype asm async await break cancel catch comptime const continue defer else enum errdefer error export extern FALSE false fn for if inline nakedcc noalias null or orelse packed promise pub resume return linksection stdcallcc struct suspend switch test threadlocal TRUE true try undefined union unreachable use var volatile while
@alberic89
alberic89 / FCSC_2023_Aaarg.md
Created April 3, 2024 16:28
FCSC 2023 Aaarg

Type de fichier

Un premier test simple est de tenter de lire le fichier avec cat :

ELF>P@@�1@8
           @@@@@h��@�@@@��@@��  @ @��.>@>@8H.>@>@���@�@DDP�td(!(!@(!@DDQ�tdR�td.>@>@/lib64/ld-linux-x86-64.so
...
@alberic89
alberic89 / pycompiler.sh
Last active November 2, 2023 12:32
Compile python libs in the env
cd env/lib && find -name "*.pyc" -delete && python -OO -m compileall . -j 0 && find . -path "*/__pycache__/*.pyc" -execdir sh -c "mv {} ../\$(basename {} | cut -d'.' -f1).pyc" \; && find -name "*.py" -delete && cd ../..
@alberic89
alberic89 / unifieddiff.py
Last active October 8, 2023 16:57 — forked from cyanidium/unifieddiff.py
Apply unified diff patches in pure python2/3
#!/usr/bin/env python
# coding=utf-8
# License: Public domain (CC0)
# Isaac Turner 2016/12/05
from __future__ import print_function
import difflib
import re
@alberic89
alberic89 / unifieddiff.py
Created October 8, 2023 16:55 — forked from noporpoise/unifieddiff.py
Apply unified diff patches in pure python2/3
#!/usr/bin/env python
# coding=utf-8
# License: Public domain (CC0)
# Isaac Turner 2016/12/05
from __future__ import print_function
import difflib
import re
const std = @import("std");
const debug = std.debug;
const fs = std.fs;
const io = std.io;
const mem = std.mem;
const os = std.os;
pub fn main() !void {
var tty = try fs.cwd().openFile("/dev/tty", .{ .mode = .read_write });
defer tty.close();
@alberic89
alberic89 / stdin_test.zig
Created August 1, 2023 14:16
Test for stdin use in Zig
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
const stdin = std.io.getStdIn();
defer stdin.close();
const reader = stdin.reader();
const max_input = 1024;
try stdout.print("What is your name? ", .{});
var input_buffer: [max_input]u8 = undefined;
name: Build
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
version: 1
script:
- rm -rf ./AppDir || true
AppDir:
path: ./AppDir
app_info:
id: wesnoth