Skip to content

Instantly share code, notes, and snippets.

View maacpiash's full-sized avatar
🕶️
using System.Reflection;

Ahad Chowdhury maacpiash

🕶️
using System.Reflection;
View GitHub Profile
@maacpiash
maacpiash / renameFolders.ts
Last active June 1, 2020 13:51
Rename the folders exported by Sony PlayMemories app to YYYY-MM-DD format
import { readdirSync, renameSync } from 'fs'
const dirName = process.argv[2] ?? './'
// if the path to the folders is not to be specified,
// the script should be run from inside the folder.
readdirSync(dirName, { withFileTypes: true })
.filter(dir => dir.isDirectory())
.map(dir => {
const oldName = dir.name
@maacpiash
maacpiash / tsconfig.json
Last active June 11, 2020 13:03
Default typescript configuration
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"allowJs": false, /* Allow javascript files to be compiled. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"outDir": "./out", /* Redirect output structure to the directory. */
@maacpiash
maacpiash / movies.md
Last active August 4, 2024 05:25
Sci-fi movies related to time travel, parallel universes, physics, quantum

Alternate Universes

  • Source Code (2011)
  • Parallel (2018)
  • Last Action Hero (1993)
  • Spider-Man: Into the Spider-Verse (2018)
  • Happy Death Day 2U (2019)
  • The One (2001)
  • The Nines (2007)
  • Pleasantville (1998)
@maacpiash
maacpiash / sign.html
Created September 2, 2021 10:10
Email signature
<p>I am looking forward to hearing from you.</p>
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="2">
<div style="padding-bottom: 15px">
<div>Mohammad Abdul <strong>Ahad</strong> Chowdhury</div>
<div>Graduate student of data science, Macquarie University</div>
<div>Software Engineer, Apollo International</div>
@maacpiash
maacpiash / enhancer-for-youtube.json
Last active November 12, 2022 04:14
Firefox Extensions
{
"version": "2.0.117.8",
"settings": {
"blur": 0,
"brightness": 100,
"contrast": 100,
"grayscale": 0,
"huerotate": 0,
"invert": 0,
"saturate": 100,
@maacpiash
maacpiash / App.js
Last active May 10, 2022 15:12
React mistakes
import { useEffect, useState } from 'react'
export default function App() {
const [title, setTitle] = useState({
firstTitle: 'Java',
secondTitle: 'Script',
renderCount: {
value: 0, // this will increase by 1 every time the button is clicked
comment: 'The count value preserves the count of the clicks.' // a constant. no change ever.
},
@maacpiash
maacpiash / README.md
Last active July 21, 2022 16:52
Neovim configuration

File structure of ~/.config/nvim:

.
├── coc-settings.json
├── init.lua
├── lua
│   ├── barb.lua
│   ├── keys.lua
│   ├── opts.lua

Keybase proof

I hereby claim:

  • I am maacpiash on github.
  • I am maacpiash (https://keybase.io/maacpiash) on keybase.
  • I have a public key ASCIvol0MMUpbspcRW02WDgC2isuRQcWOAUTh8zjHP5ICQo

To claim this, I am signing this object:

import { children, JSX, mergeProps } from 'solid-js'
export interface ButtonProps {
bgColor?: string
hoverColor?: string
activeColor?: string
children: JSX.Element
}
export default function Button(props: ButtonProps) {
@maacpiash
maacpiash / aot-Program.cs
Last active September 28, 2023 04:04
ASP.NET Core 8 RC 1 vs Bun 1.0.7 (Elysia) performance
using System.Text.Json.Serialization;
var builder = WebApplication.CreateSlimBuilder(args);
builder.Services.ConfigureHttpJsonOptions(options =>
{
options.SerializerOptions.TypeInfoResolverChain.Insert(0, AppJsonSerializerContext.Default);
});
var app = builder.Build();