Skip to content

Instantly share code, notes, and snippets.

View ibishek's full-sized avatar
🏢
Working from office

Abhishek Rijal ibishek

🏢
Working from office
View GitHub Profile
@ibishek
ibishek / Vuejs Dynamic Import
Created December 5, 2022 13:59
Dynamic import enables the dynamic loading of ECMAScript modules. Dynamic import contributes to a significantly smaller bundle size.
function importPage(page) {
return () => import(page).then((module) => module.default || module);
}
const routes = [
{
path: '/',
name: 'index',
component: importPage('../pages/Index.vue')
},
@ibishek
ibishek / sassas.md
Created October 3, 2022 02:50 — forked from AdamMarsden/sassas.md
Sass Architecture Structure

Sass Architecture Structure

sass/
|
|– base/
|   |– _reset.scss       # Reset/normalize
|   |– _typography.scss  # Typography rules
|   ...                  # Etc…
|
<?php
$passwordLength = 15;
$numbers = '0123456789';
$lower = 'abcdefghijklmnopqrstuvwxyz';
$upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$symbols = '~`!@#$%^&*()_+-=-+,.<>/?\\|';
$combine = $numbers . $lower . $upper . $symbols;
<?php
$length = 12;
$series = '0 1 ';
$previous = 0;
$current = 1;
for($i = 2; $i < $length; $i++) {
$series .= $previous + $current . ' ';
<?php
$text = 'GiThuBIsGreattAergSiBuHTig';
if(strcmp(strtolower($text), strrev(strtolower($text))) === 0) {
echo "$text is a Plindrome String";
} else {
echo "$text is not a Palindrome String";
}
<?php
function primeOrComposite($num)
{
if($num <= 0 or $num === 1) {
return "Invalid Number";
}
for($i = 2; $i <= $num / 2; $i++) {
if($num % $i === 0) {
<?php
for($i = 1; $i < 100; $i++) {
if($i % 15 === 0) {
echo 'FizzBuzz' . PHP_EOL;
} elseif($i % 3 === 0) {
echo 'Fizz' . PHP_EOL;
} elseif($i % 5 === 0) {
echo 'Buzz' . PHP_EOL;
} else {