Skip to content

Instantly share code, notes, and snippets.

View IamSAL's full-sized avatar
DayDreaming

Sheikh Salman IamSAL

DayDreaming
View GitHub Profile
@IamSAL
IamSAL / squirrel_correlation.js
Created June 3, 2020 15:32
The lycanthrope's log problem of the book 'Eloquent_JavaScript'
var JOURNAL = [
{"events":["carrot","exercise","weekend"],"squirrel":false},
{"events":["bread","pudding","brushed teeth","weekend","touched tree"],"squirrel":false},
{"events":["carrot","nachos","brushed teeth","cycling","weekend"],"squirrel":false},
{"events":["brussel sprouts","ice cream","brushed teeth","computer","weekend"],"squirrel":false},
{"events":["potatoes","candy","brushed teeth","exercise","weekend","dentist"],"squirrel":false},
{"events":["brussel sprouts","pudding","brushed teeth","running","weekend"],"squirrel":false},
{"events":["pizza","brushed teeth","computer","work","touched tree"],"squirrel":false},
@IamSAL
IamSAL / gist:3abca13022822594031c69d35e950ddf
Created December 12, 2020 02:48
Semi-automated solver script for Toptal's js speedcoding(december,2020).
//double click to submit
window.addEventListener('dblclick', e => {
e.preventDefault();
document.getElementsByClassName('btn btn-success')[0].click();
setTimeout(() => {
document.getElementsByClassName('btn btn-success')[0].click();
}, 900);
})
@IamSAL
IamSAL / gist:56794adbd4c4c6268573025aa8f8c44f
Created December 22, 2020 20:51 — forked from Mikodes/gist:be9b9ce42e46c3d4ccb6
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
<section class="confirmation_section "><div class="user_section flex_between m-auto"><img src="/images/user.png" alt=""><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M6.23 20.23L8 22l10-10L8 2 6.23 3.77 14.46 12z"></path></svg><img src="https://cms.softwindtech.com/assets/con_logos/gp.png" class="operator_icon" alt=""></div><div class="main_content"><p>Payment to grameenphone from <span></span></p><h2>20<span>BDT</span></h2><small>Recharge for Salman gp</small><h3 class="btnText my-2">01705548264</h3><h3 class="btnText my-3">Select Authorization Mode</h3></div><div><div class="flex_center"><button type="button" class="btnRound me-2">Back</button><button type="submit" class="btnRound_red">Next</button></div></div></section>
.confirmation_section {
.user_section {
width: 120px;
padding-bottom: 30px;
}
.main_content {
@IamSAL
IamSAL / check-git.ts
Last active May 26, 2023 05:44
Swagger to Typed API for multiple microservices.
import { execSync } from "child_process";
export function hasUncommittedChanges(): boolean {
try {
execSync("git diff-index --quiet HEAD --");
return false;
} catch (error) {
return true;
}
}
@IamSAL
IamSAL / rclone.md
Last active October 9, 2024 15:33
move local files using rclone

Here are the steps to upload your local folder FrontendMastersCourses to the remote WebDAV server's courses folder using rclone:

1. Install rclone

If you haven't installed rclone yet, you can download it from rclone.org/downloads and follow the installation instructions for your operating system.

2. Configure rclone WebDAV Remote

Run the following command to configure the WebDAV connection:

rclone config