Skip to content

Instantly share code, notes, and snippets.

@Vigowebs
Vigowebs / tw-battle-01042024.html
Created April 13, 2024 14:49
Tailwind Battle daily challenge 01st April 2024
<div class="flex flex-col gap-4 p-4 *:h-14 *:rounded-xl *w-full">
<div class="bg-blue-500"></div>
<div class="bg-orange-400"></div>
<div class="bg-red-400"></div>
</div>
@Vigowebs
Vigowebs / markdown-cheatsheet.md
Created April 3, 2024 04:45
Markdown cheat sheet

Markdown Cheat sheet


Heading 01

Heading 02

Heading 03

@Vigowebs
Vigowebs / twillo-sms.js
Created March 5, 2024 13:53
Send SMS using Twilio
//Load the packages
const twilio = require("twilio");
require("dotenv").config();
//Initiate the twilio client with Account SID, token, Phone Number and Receiver Number
//You will find the Account SID and token in your Twilio account page
// for testing create a test phone number in Twilio
// for receiver update your mobile number
@Vigowebs
Vigowebs / index.html
Last active October 9, 2023 17:56
Swiper JS with Progress bar and fraction
<div class="swiper">
<div id="fraction" class="swiper-fraction"></div>
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="/asset/image/slide-01.jpg" alt="">
</div>
<div class="swiper-slide">
<img src="/asset/image/slide-02.jpg" alt="">
</div>
<div class="swiper-slide">
@Vigowebs
Vigowebs / checkers.css
Last active July 7, 2023 18:09
CSS Battle - Checkers
/* Using Box shadow and box-reflect */
<div class=a>
<style>
*{background:#926927}
.a{
width: 20;
height:20;
background:#F8B140;
border-radius: 50%;
@Vigowebs
Vigowebs / index.html
Last active March 16, 2024 14:17
How to create scratch card using JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scratch card using HTML5 and Canvas</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
@Vigowebs
Vigowebs / color-extract-from-image.py
Created April 2, 2023 17:44
Color Extraction from Image using Python
from PIL import Image
Image.open('sunset.jpg')
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
image = mpimg.imread('sunset.jpg')
w, h, d = tuple(image.shape)
pixels = np.reshape(image, (w * h, d))
@Vigowebs
Vigowebs / destroyable.php
Created January 13, 2023 04:19
An easy way to mark singleton routes as "destroyable." This type of route may be deleted, but it may not be created by default.
// Before
Route::singleton(...)->creatable()->except('create', 'store');
// After
Route::singleton(...)->destroyable();
@Vigowebs
Vigowebs / hover-button-01.css
Created January 7, 2023 16:17
Hover button 01
@import url("https://fonts.googleapis.com/css?family=Roboto:900");
body {
background: #111;
}
a {
font-family: "Roboto", "sans-serif";
font-weight: 900;
color: #000;
@Vigowebs
Vigowebs / walrus-operator.py
Created January 4, 2023 20:07
Walrus operator in python
numbers = [1, 2, 3, 4]
# Without the walrus operator
i = 0
while i < len(numbers):
print(numbers[i])
i += 1
# With the walrus operator
while (i := 0) < len(numbers):