Skip to content

Instantly share code, notes, and snippets.

View jiyometrik's full-sized avatar
💭
ka ti rupne unna ter?

Darren Yap jiyometrik

💭
ka ti rupne unna ter?
View GitHub Profile
@jiyometrik
jiyometrik / water-droplet.ipynb
Last active January 30, 2024 01:54
A little piece of code to draw a water droplet using differential parametric equations!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiyometrik
jiyometrik / .latexmkrc
Last active June 11, 2023 09:23
My .latexmkrc and Makefile for LaTeX projects.
#!/usr/bin/env perl
# timezone
$ENV{'TZ'} = 'Asia/Singapore';
# compilation
$pdflatex = 'pdflatex -shell-escape'; # enable shell-escape for `minted' package
$pdf_mode = 1; # only generate the pdf
$max_repeat = 8; # maximum number of runs
@jiyometrik
jiyometrik / Macros.cpp
Last active May 30, 2023 00:32
a file of my macros used for competitive programming in c++.
#include <bits/stdc++.h>
using namespace std;
typedef long int li;
typedef long long int ll;
typedef long double ld;
typedef unsigned long long int ull;
#define pa pair
#define vc vector
#define dq deque
#define qu queue
@jiyometrik
jiyometrik / B_waterbottles.cpp
Last active May 5, 2023 12:10
a solution for the 2023 ec3 beginner competitive programming final contest's problem B: waterbottles in c++.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int H, W, K;
cin >> H >> W >> K;
@jiyometrik
jiyometrik / A_conlanging.cpp
Created May 5, 2023 04:14
a solution for the 2023 ec3 beginner competitive programming final contest's problem A: conlanging in c++.
#include <bits/stdc++.h>
using namespace std;
bool vowel(char a) {
return a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u' || a == 'y';
}
int main() {
ios_base::sync_with_stdio(0);
@jiyometrik
jiyometrik / urw-garamond.org
Last active April 3, 2022 10:33
A guide to installing the URW Garamond / MathDesign font if it isn't included in your LaTeX distribution..

How To Get urw-garamond And mathdesign Working in LaTeX

URW Garamond and MathDesign

Many people adore the Garamond font and its many variations. With that, LaTeX has also introduced its own version, with a complimentary math-mode font, inside the mathdesign package.

The most common way to use it is as follows:

@jiyometrik
jiyometrik / latex-fonts.tex
Last active April 24, 2022 04:35
a short LaTeX file demonstrating common fonts used when writing in LaTeX and how to apply them.
\documentclass[11pt]{article}
\usepackage{blindtext}
\usepackage[parfill]{parskip}
% baskervaldx
\usepackage[lf]{Baskervaldx} % lining figures
\usepackage[bigdelims,vvarbb]{newtxmath} % math italic letters from Nimbus Roman
\usepackage[cal=boondoxo]{mathalfa} % mathcal from STIX, unslanted a bit
\renewcommand*\oldstylenums[1]{\textosf{#1}}
@jiyometrik
jiyometrik / .clang-format
Last active May 6, 2023 00:37
My .clang-format file for competitive programming in C++.
BasedOnStyle: Google
UseTab: ForContinuationAndIndentation
IndentWidth: 2
TabWidth: 2
ColumnLimit: 80
SpacesBeforeTrailingComments: 1
AlignTrailingComments: false
AlignEscapedNewlines: DontAlign