Skip to content

Instantly share code, notes, and snippets.

View zaerl's full-sized avatar
🏠
Working from home

Francesco Bigiarini zaerl

🏠
Working from home
View GitHub Profile
This little emoji
BITS 16
start:
mov ax, 07C0h
add ax, 288
mov ss, ax
mov sp, 4096
; Have fun here!
#include <attractor.h>
int var_to_test_1 = 1;
float var_to_test_2 = 2.0;
ATT_ASSERT(var_to_test_1, 1, "integer test")
ATT_ASSERT(var_to_test_2, 2.0, "float test")
ATT_ASSERT("foo", "foo", "Strings compare")
// Etc.
ATT_ASSERT(VALUE, EXPECTED, "A brief description")
cmake_minimum_required(VERSION 3.0)
project(MyProject)
# Add all .c files in the src directory to the list of source files
file(GLOB SOURCES "src/*.c")
# Include the headers directory
include_directories("src")
# Create the executable target
% cmake --version
cmake version 3.28.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
% brew info cmake
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
==> cmake: stable 3.28.3 (bottled), HEAD
Cross-platform make
https://www.cmake.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/c/cmake.rb
License: BSD-3-Clause
==> Options
--HEAD
# Get all .c files from src/ directory
SRCS = $(shell find $(SRC_DIR) -type f -name "*.c")
# Generate corresponding .o file names
OBJS = $(patsubst $(SRC_DIR)/%, $(BUILD_DIR)/%, $(SRCS:.c=.o))
@zaerl
zaerl / keybase.md
Created March 25, 2014 13:49
keybase.md

Keybase proof

I hereby claim:

  • I am zaerl on github.
  • I am zaerl (https://keybase.io/zaerl) on keybase.
  • I have a public key whose fingerprint is 8004 AB38 C43D F240 3375 04AB 49FA 7BE5 F27C B464

To claim this, I am signing this object:

@zaerl
zaerl / woocsv.js
Last active December 19, 2015 00:09
Add ajaxurl on woocommerce-csvimport admin js file
var d = Date.now();
jQuery(document).ready(function()
{
jQuery('#headerForm').submit(function(e)
{
var saveHeaderForm = jQuery(this).serialize();
jQuery.ajax(
{
type: "POST",
url: ajaxurl,