Skip to content

Instantly share code, notes, and snippets.

View khairulhasanmd's full-sized avatar

Md. Khairul Hasan khairulhasanmd

View GitHub Profile
@khairulhasanmd
khairulhasanmd / winscp-linux-to-windows-copy-run-from-windows.bat
Last active December 24, 2015 12:03
Use winscp to copy linux directory to windows.
# this script must run on linux
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect to SFTP server using a password
open sftp://user:[email protected]/ -hostkey="ssh-rsa 2048 33:33:33:73:88:33:30:53:ef:33:66:33:66:33:33:33"
# Download File
cd /home/user/Desktop/folderToCopy/
lcd D:\folder\folder\folder\
@khairulhasanmd
khairulhasanmd / C.sublime.build
Created December 8, 2015 15:30
Sublime C build in windows
{
"windows":
{
"cmd": ["g++","$file_name","-o", "${file_base_name}.exe", "-lm", "-Wall", "&","start", "${file_base_name}.exe"]
},
"selector" : "${file_base_name}.c",
"shell": true,
"working_dir" : "$file_path",
}
del DskPrtCmd.txt
REM ECHO DISKPART > DskPrtCmd.txt
ECHO LIST DISK >> DskPrtCmd.txt
ECHO SELECT DISK 1 >> DskPrtCmd.txt
ECHO CLEAN >> DskPrtCmd.txt
ECHO CREATE PARTITION PRIMARY >> DskPrtCmd.txt
ECHO SELECT PARTITION 1 >> DskPrtCmd.txt
ECHO ACTIVE >> DskPrtCmd.txt
ECHO FORMAT FS=NTFS QUICK >> DskPrtCmd.txt
ECHO ASSIGN >> DskPrtCmd.txt
@khairulhasanmd
khairulhasanmd / user+group-permission
Created December 16, 2015 17:36
changing a directory permission in linux
chgrp -R mygroup /var/www
chmod -R g+rwxs /var/www
DROP TRIGGER IF EXISTS test.test_before_insert_trigger ;
CREATE TRIGGER test_before_insert_trigger BEFORE INSERT ON test
FOR EACH ROW
SET NEW.id = ((substr((NOW()),1,4)*10000)+(substr((NOW()),6,2)*100)+(substr((NOW()),9,2)));
DROP TRIGGER IF EXISTS `test`.`test_before_insert_trigger` ;
DELIMITER $$
for php processing in server side:
http://stackoverflow.com/questions/3314567/how-to-get-form-input-array-into-php-array
<!DOCTYPE html>
<html>
<head>
<title>HTML dynamic table using JavaScript</title>
<script type="text/javascript">
function addRow() {
var myName = document.getElementById("name");
<?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;
<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 };
@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
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",