Skip to content

Instantly share code, notes, and snippets.

View khairulhasanmd's full-sized avatar

Md. Khairul Hasan khairulhasanmd

View GitHub Profile
@khairulhasanmd
khairulhasanmd / rest.php
Last active December 17, 2016 04:02
Rest API
//receiver
CREATE TABLE `sync` (
`name` varchar(100) NOT NULL,
`id` int(11) NOT NULL,
`address` varchar(100) NOT NULL,
`phone` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@khairulhasanmd
khairulhasanmd / biscuit.htm
Created September 25, 2016 04:37
taken from mdn
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.biscuit {
display: inline-block;
min-width: 20px;
vertical-align: baseline;
margin-left: 10px;
border-radius: 2px;
@khairulhasanmd
khairulhasanmd / var www
Last active September 27, 2024 01:39
permission to var www
sudo adduser $USER www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rwX /var/www
sudo chgrp www-data /var/www
#logout and login
@khairulhasanmd
khairulhasanmd / index.htm
Last active May 7, 2016 08:31
Scroll to top and Scroll to bottom
<html>
<head>
<script>
$( document ).ready(function() {
$('#scrolltotop').fadeOut();
$('#scrolltotop').on("click", function () {
var percentageToScroll = 100;
var percentage = percentageToScroll / 100;
var height = $(document).scrollTop();
var scrollAmount = height * (1 - percentage);
@khairulhasanmd
khairulhasanmd / Incremental_Selection.py
Last active April 2, 2016 05:18
incremental selection sublime
in Tools/New Plugin...:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
import sublime, sublime_plugin
class IncrementSelectionCommand(sublime_plugin.TextCommand):
def run(self, edit):
start_value = int(self.view.substr(self.view.sel()[0]))
counter = 0
for selection in self.view.sel():
self.view.insert(edit, selection.begin(), str(start_value + counter))
@khairulhasanmd
khairulhasanmd / post-data.php
Created March 8, 2016 04:48
get all post-data
echo'<table>';
foreach ($_POST as $key => $value) {
echo "<tr>";
echo "<td>";
echo $key;
echo "</td>";
echo "<td>";
echo $value;
echo "</td>";
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
@khairulhasanmd
khairulhasanmd / codeigniter-db-backup.php
Last active July 23, 2019 14:54
codeigniter-db-backup
<?php
//http://codepen.io/noeldelgado/pen/NPGmRO
//http://codepen.io/mr_alien/pen/FDLjg
//http://codepen.io/simeydotme/pen/jgcvi
//http://codepen.io/notduncansmith/pen/ogbwEv
//http://codepen.io/kowlor/pen/ZYYQoy
//http://codepen.io/aurer/pen/jEGbA
//http://codepen.io/lukerichardville/pen/NGPMMJ
//http://codepen.io/isuttell/pen/OPVELL
<html>
<head><title>Canvas Halftoning</title></head>
<body>
<canvas id="c"></canvas>
<img id="s" src="./pomeranian.jpg" />
</body>
<script type="text/javascript">
var interval = 8;
var angles = { y: 108, m: 162, c: 90, k: 45 };
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ISPnub - Stand-alone AVR In-System-Programmer Module - fischl.de</title>
<style type="text/css">
body {
font-family:Liberation Sans,Arial,Helvetica,sans-serif;
color: #484848;