Skip to content

Instantly share code, notes, and snippets.

View haruncpi's full-sized avatar

Md.Harun-Ur-Rashid haruncpi

View GitHub Profile
@haruncpi
haruncpi / check-if-element-in-viewport-on-scroll.js
Created March 17, 2020 03:20 — forked from EvanHerman/check-if-element-in-viewport-on-scroll.js
Check when an element comes into view (jQuery)
function isOnScreen(elem) {
// if the element doesn't exist, abort
if( elem.length == 0 ) {
return;
}
var $window = jQuery(window)
var viewport_top = $window.scrollTop()
var viewport_height = $window.height()
var viewport_bottom = viewport_top + viewport_height
var $elem = jQuery(elem)
@haruncpi
haruncpi / ContactController.php
Last active July 30, 2019 16:55
Laravel - jQuery Ajax CRUD
<?php
namespace App\Http\Controllers;
use App\Contact;
use Illuminate\Http\Request;
class ContactController extends Controller
{
@haruncpi
haruncpi / ball-to-over.js
Created October 2, 2018 08:17
Simple function to get over from total balls.
function ballToOver(totalBall) {
return Number(Math.floor(totalBall / 6) + '.' + totalBall % 6)
}
/*
Example:
console.log(ballToOver(15))
output: 2.3
*/
@haruncpi
haruncpi / customroutes.php
Created September 17, 2018 11:47 — forked from samhernandez/customroutes.php
A simple class to add custom routes to Wordpress.
<?php
/**
* A class to create simple custom routes.
*
* Example usage:
*
* $theme_routes = new CustomRoutes();
* $theme_routes->addRoute(
*
@extends('app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-12">
<form action="" method="POST" class="form-inline">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="text" name="name" class="form-control" placeholder="Enter a task name">
@extends('app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-12">
<h3>Todo/Edit</h3>
<form action="{{route('postEditRoute',$data->id)}}" method="POST" class="form-inline">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd,gm;
gd=DETECT;
initgraph(&gd, &gm,"C:\\TC\\bgi");
line(100,100,200,100);
getch();
@haruncpi
haruncpi / home.blade.php
Last active October 1, 2017 15:48
laravel 5 Todo home
@extends('app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-10">
<form action="" method="POST" class="form-inline">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<p>Work name</p>
<p>
<input type="text" class="form-control" name="workName"/>