Skip to content

Instantly share code, notes, and snippets.

View aziyan99's full-sized avatar
🖥️
Near From Keyboard

Raja Azian aziyan99

🖥️
Near From Keyboard
View GitHub Profile
@aziyan99
aziyan99 / getline.c
Last active June 11, 2024 12:22
Simple POSIX getline() implementation in C using fgets()
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
ssize_t getline(char **restrict lineptr, size_t *restrict n, FILE *restrict stream)
{
// check if either lineptr or n are NULL pointers
if (lineptr == NULL || n == NULL)
{
fputs("Error! Bad arguments.\n", stderr);
@aziyan99
aziyan99 / logs.txt
Last active October 26, 2023 14:10
PITG Mangrove cnn training logs
# Arsitektur (Tensorflow-python):
```
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d_9 (Conv2D) (None, 148, 148, 32) 896
max_pooling2d_9 (MaxPoolin (None, 74, 74, 32) 0
g2D)
@aziyan99
aziyan99 / .wezterm.lua
Last active February 21, 2024 07:58
wezterm config
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
@aziyan99
aziyan99 / GeoJSONParser.php
Created June 10, 2023 12:12
simple geojson parser in PHP
<?php
abstract class GeoJSONType
{
const PROVINCES = 'provinces';
const REGENCIES = 'regencies';
const DISTRICTS = 'districts';
const VILLAGES = 'villages';
const FEATURE_COLLECTION = 'FeatureCollection';
}
@aziyan99
aziyan99 / export-csv-moodle.php
Created December 28, 2022 09:45 — forked from kralo/export-csv-moodle.php
Example boilerplate for csv export from moodle
<?php
/**
* Example for howto to serve a csv file for download in Moodle using the /lib/csvlib.class.php
* Very handy for exporting various data. This example demonstrates csv data export from within a moodle plugin
*
* This file is public domain where applicable,
* else GNU LGPL
*/
require_once '../../config.php'; // to include $CFG, for example
require_once ($CFG->libdir . '/csvlib.class.php');
@aziyan99
aziyan99 / init.vim
Created December 26, 2022 03:02
An neovim configuration
set tabstop=4
set expandtab
set number
set relativenumber
set autoindent
set smarttab
set shiftwidth=4
set softtabstop=4
set mouse=a
set nowrap
@aziyan99
aziyan99 / .zshrc
Created December 26, 2022 03:01
An zsh shell configuration
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/rajaazian/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@aziyan99
aziyan99 / php.ini
Created December 6, 2022 13:29
php.ini php74 moodle
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@aziyan99
aziyan99 / index.html
Created October 7, 2022 11:14
Simple note taking UI with tailwind
<div class="flex">
<nav class="bg-gray-100 w-10 flex-shrink-0 border-r border-gray-200 min-h-screen py-3 px-1.5 align">
<a href="javascript:;" class="block">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-6 h-6">
<path d="M6 6C6 5.44772 6.44772 5 7 5H17C17.5523 5 18 5.44772 18 6C18 6.55228 17.5523 7 17 7H7C6.44771 7 6 6.55228 6 6Z" fill="currentColor"/>
<path d="M6 10C6 9.44771 6.44772 9 7 9H17C17.5523 9 18 9.44771 18 10C18 10.5523 17.5523 11 17 11H7C6.44771 11 6 10.5523 6 10Z" fill="currentColor"/>
<path d="M7 13C6.44772 13 6 13.4477 6 14C6 14.5523 6.44771 15 7 15H17C17.5523 15 18 14.5523 18 14C18 13.4477 17.5523 13 17 13H7Z" fill="currentColor"/>
<path d="M6 18C6 17.4477 6.44772 17 7 17H11C11.5523 17 12 17.4477 12 18C12 18.5523 11.5523 19 11 19H7C6.44772 19 6 18.5523 6 18Z" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 4C2 2.34315 3.34315 1 5 1H19C20.6569 1 22 2.34315 22 4V20C22 21.6569 20.6569 23 19 23H5C3.343