View serialize-nulls.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* the first example uses Kotlin's data classes to define the structure | |
* this is the suitable approach if the classes are already defined | |
*/ | |
data class UserData( | |
var user_id: String? = null, | |
var user_name: String? = null | |
) {} |
View database-backup.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Back-up Level Database and store it in a S3 bucket in Gunzip format | |
* required packages: | |
* 1. mysqldump | |
* 2. gzip | |
* 3. aws-cli | |
* | |
* set mysql credentials using mysql_config_editor | |
* 1. mysql_config_editor set --password | |
* 2. mysql_config_editor print --all (to see config option) |
View tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"lib": [ | |
"dom", | |
"dom.iterable", | |
"esnext" | |
], | |
"allowJs": true, | |
"skipLibCheck": true, |
View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>WebRTC Practice</title> | |
</head> | |
<body> | |
<video | |
id="vid1" | |
src="" |
View AbortController-in-action.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* this function would return a Promise | |
* which would resolve with value `hello` | |
* after 4s | |
*/ | |
function abortTask({ signal }) { | |
return new Promise((resolve, reject) => { | |
// 1. check if it's already aborted | |
if (signal && signal.aborted) { | |
return reject(new DOMException('`signal` is in `aborted` state', 'ABORT_ERR')); | |
} |
View octocat-hire-me.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
REPO=artistic | |
UPLOAD_INSTRUCTIONS="Upload your creation to GitHub! | |
# 1. Create a new empty repo on your GitHub account | |
# 2. Upload your repository using the instructions on https://github.com/new, or this script!" | |
git init $REPO | |
cd $REPO | |
touch README.md |
View jekyll-deploy-script.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Stage and Commit Every Unsaved changes | |
# and push them to master | |
git add . | |
git commit -m 'comitted from deploy script' | |
git push origin master | |
# generate a clean build | |
bundle exec jekyll clean |
View secure-email-static-site.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<form action=""> | |
<input | |
type="email" | |
id="email" | |
name="email" | |
placeholder="mail@abdus.xyz" | |
/> | |
<br /> |
View keybase.md
Keybase proof
I hereby claim:
- I am thisisabdus on github.
- I am thisisabdus (https://keybase.io/thisisabdus) on keybase.
- I have a public key ASB_kPwE-z_xjwIZDSBLGdmLBJfhKYUpuSm6EM6qRD4CMwo
To claim this, I am signing this object:
NewerOlder