Skip to content

Instantly share code, notes, and snippets.

View kaiimran's full-sized avatar
👾
Lifelong learner

Khairul Imran kaiimran

👾
Lifelong learner
View GitHub Profile
@kaiimran
kaiimran / swiperdemo.html
Last active September 1, 2021 06:10
Swiper.js - Infinite loop slides, lazy load images, autoplay, clickable pagination, no left/right arrow.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Swiper demo</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"
/>
<!-- Link Swiper's CSS -->
@kaiimran
kaiimran / goget.html
Last active June 6, 2020 08:10
GoGet API
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$.ajax({
url: 'https://staging-api.goget.my/api/public/v1/jobs',
headers: {
@kaiimran
kaiimran / involveasia.cpp
Created June 4, 2020 17:11
Sort the numbers stored in $data variable. $data = [9,7,5,3,0];
#include<iostream>
#include<conio.h>
#include<cstring>
using namespace std;
void display(int[], int);
void sort(int[], int);
void sort2(int[], int);
void sort3(int[], int);
@kaiimran
kaiimran / InvolveAsia.class
Created June 4, 2020 17:09
Write a short program that prints each number from 1 to 180 on a new line. For each multiply of 3, print "Involve" instead of the number. For each multiply of 5, print "Asia" instead of the number. For numbers which are multiply of both 3 and 5, print "InvolveAsia" instead of the number.
import java.io.*;
public class InvolveAsia{
public static void main(String []args){
involveAsia(180);
}
static void involveAsia(int n)
{
@kaiimran
kaiimran / FullBattery.vbs
Created May 31, 2020 02:57
Windows notification when battery level is 99%
' Battery Fully Charged Notification VBS - checked every 5 minutes
' To run the script automatically on startup, put this file into startup directory:
' Press Win+R, Type shell:startup, click OK
' (C:\Users\YOU\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup)
set oLocator = CreateObject("WbemScripting.SWbemLocator")
set oServices = oLocator.ConnectServer(".","root\wmi")
set oResults = oServices.ExecQuery("select * from batteryfullchargedcapacity")
for each oResult in oResults
iFull = oResult.FullChargedCapacity