Skip to content

Instantly share code, notes, and snippets.

View harieamjari's full-sized avatar

Al-buharie harieamjari

View GitHub Profile
#include <stdio.h>
#include <string.h>
#include <assert.h>
int main(int argc, char *argv[]){
assert(argc == 3);
char *file_name = argv[1];
char *html_title = argv[2];
FILE *fpin = stdin;
@harieamjari
harieamjari / pprint.c
Last active October 6, 2023 08:38
2D image (png) rectangle packing
// Generate packed pictures
// gcc pprint.c -lpng16 -lz -O2 -o pprint
// This takes in a 8 bit depth RGBA png of any size, and produces an a4 size
// paper of 300dpi Which can be use for automatically generating 1x1in copies of
// picture for mass production.
/**
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
\documentclass[12pt]{article}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{graphicx, chemfig, hyperref}
\title{Physics \\
Activity \#2: What's the matter?}
\author{Al-buharie Amjari, STEM-A 12}
\makeatletter % from: https://tex.stackexchange.com/a/101263/134144
\tikzset{
dot diameter/.store in=\dot@diameter,
@harieamjari
harieamjari / .gitignore
Last active December 20, 2021 13:48
Letter SCC
*.aux
*.log
t.pdf
@harieamjari
harieamjari / pdfa.pdf
Last active November 19, 2021 14:57
pdfa
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@harieamjari
harieamjari / nonpdfa.pdf
Last active November 19, 2021 14:50
nonpdfa
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@harieamjari
harieamjari / .gitignore
Last active October 5, 2021 09:35
Assignment research
*.log
*.aux
*.pdf
@harieamjari
harieamjari / learnt.c
Last active July 17, 2021 14:43
New tricks learned in C
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct vec3D vec3D;
struct vec3D {
float x, y, z;
};
_Static_assert(sizeof(vec3D) == 12, "May not work");
@harieamjari
harieamjari / calculus101.tex
Created July 8, 2021 04:15
Learning tex language.
\documentclass{article}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{geometry}[top=0.5in]
\title{Basic Calculus \\
Activity II}
@harieamjari
harieamjari / get.c
Created June 15, 2021 15:17
GET request for a file; download a file using an HTTP request. OpenSSL
/*
* Copyright 2013-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <openssl/err.h>