Skip to content

Instantly share code, notes, and snippets.

View ratul16's full-sized avatar
👨‍💻
Working with Vue3

Hasibul Alam Ratul ratul16

👨‍💻
Working with Vue3
View GitHub Profile
[
{
"id": 1,
"coord": {
"lon": -4.00167,
"lat": 5.35444
},
"country": "Ivory Coast",
"name": "Abidjan"
},
@ratul16
ratul16 / .prettierrc
Created March 4, 2024 08:32
Prettier Config
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"singleAttributePerLine": true,
"htmlWhitespaceSensitivity": "css",
"tabWidth": 2,
@ratul16
ratul16 / vscode-config.txt
Last active January 21, 2024 16:59
Vscode italic font style scopes
# VSCode italic font settings
*Add this to settings.json (`cmd ,`):*
```
{
"editor.fontFamily": "Operator Mono, Fira Code iScript, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
@ratul16
ratul16 / head.js
Created July 25, 2023 22:21 — forked from garethredfern/head.js
The full head tag for a Nuxt website, including social media and SEO tags. Put this in your nuxt.config.js file.
head: {
htmlAttrs: {
lang: "en-GB",
},
title: "Articles focused on learning Laravel and VueJS",
meta: [
{ charset: "utf-8" },
{ name: "HandheldFriendly", content: "True" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{
@ratul16
ratul16 / smart_contract.js
Created June 22, 2023 13:51
User register function for vue
async registerUser() {
try {
const accounts = await window.ethereum.request({
method: "eth_requestAccounts",
});
const user = accounts[0];
const gasEstimate = await lcContract.methods
.registerUser(this.name, this.email, this.password)
.estimateGas({ from: user });
@ratul16
ratul16 / smart-contract.sol
Created January 11, 2023 12:48
smart contract sample code
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
contract SolidityTest {
// constructor() public{
// }
function getResult() public view returns(uint){
uint a = 6;
uint b = 10;
return a + b;
@ratul16
ratul16 / bash-alias.md
Created April 25, 2022 23:29
A curated list of awesome Bash aliases.
@ratul16
ratul16 / github-cli.md
Created April 23, 2022 23:54
Installing gh on Linux and BSD

Installing gh on Linux and BSD

Packages downloaded from https://cli.github.com or from https://github.com/cli/cli/releases are considered official binaries. We focus on popular Linux distros and the following CPU architectures: i386, amd64, arm64, armhf.

Other sources for installation are community-maintained and thus might lag behind our release schedule.

Official sources

@ratul16
ratul16 / time_list.js
Created April 11, 2022 08:28
Generate Time list both for 12/24 hour format
var x = 5; //minutes interval
var times = []; // time array
var tt = 0; // start time
var ap = ['AM', 'PM']; // AM-PM
//loop to increment the time and push results in array
for (var i=0;tt<24*60; i++) {
var hh = Math.floor(tt/60); // getting hours of day in 0-24 format
var mm = (tt%60); // getting minutes of the hour in 0-55 format
times[i] = ("0" + (hh % 12)).slice(-2) + ':' + ("0" + mm).slice(-2) + ap[Math.floor(hh/12)]; // pushing data in array in [00:00 - 12:00 AM/PM format]
@ratul16
ratul16 / filterObject.js
Last active April 6, 2022 05:47
filter out selected keys from object
const formKeys = ['key1', 'key2', 'key3']
formKeys.forEach(key => {
this.testData[key] = mainData[key]
})