Skip to content

Instantly share code, notes, and snippets.

View mfrazi's full-sized avatar
😼
...

Fahrul Razi mfrazi

😼
...
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
typedef struct node{
int data;
struct node *left;
struct node *right;
int height;
}node_avl;
# See the raw format
# Copy the square
# Paste it before your text in-game
OLIVE 
PINK 
RED 
ORANGE 
DARK YELLOW 
LIGH GREEN 
@mfrazi
mfrazi / readsnk.py
Last active May 8, 2021 18:15
Download Shingeki no Kyojin from https://ww5.readsnk.com/
from bs4 import BeautifulSoup
import requests
import os
import shutil
# Taken from http://stackoverflow.com/questions/23793987/python-write-file-to-directory-doesnt-exist
# Taken from http://stackoverflow.com/a/600612/119527
def mkdir_p(path):
try:
{
"files.autoSave": "onFocusChange",
"editor.fontSize": 18,
"editor.wordWrap": "on",
"editor.lineHeight": 23,
"eslint.autoFixOnSave": true,
"workbench.colorTheme": "One Dark Pro",
"window.zoomLevel": 0,
#include<stdio.h>
#define print_diamonds for(int j=0; j<n+x; j++) printf(j<n-x-1?" ":"%d", j<n-1?x-(n-j)+2:n-j+x); printf("\n")
int main() {
int n; scanf("%d", &n);
for(int i=0, x=0; i<n; i++, x++){print_diamonds;}
for(int i=1, x=n-2; i<n; i++, x--){print_diamonds;}
return 0;
}
/*
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){char t[100];scanf("%s",t);int l=strlen(t),x=l*3-3,y=l-1;for(int i=-y;i<=y;i++,printf("\n"))for(int j=x;j>=-x;j--){int m=abs(i+j),n=abs(i-j);printf("%c",(!m||m==(l-1)*3||!n||n==(l-1)*3||abs(i)==y&&(abs(j)>=l&&abs(j)<=(l-1)*2))?(abs(j)>=l*2-1?t[abs(m-n)/2]:t[abs(l-1-abs(j))]):' ');}return 0;}
/*
Input
programming
Output
@mfrazi
mfrazi / count_files.sh
Created March 4, 2025 07:50
Count total files recursively under directory
#!/bin/bash
SFTP_HOST=""
SFTP_PORT="22"
SFTP_USER=""
PRIVATE_KEY=""
# Function to recursively list files in SFTP
count_files_recursive() {
local DIR="$1"