Skip to content

Instantly share code, notes, and snippets.

View marifrahman's full-sized avatar

Mohammad Arifur Rahaman marifrahman

View GitHub Profile
##Update last git commit command and pust it
git commit --amend -m "some comment that to be updated to"
git push --force-with-lease
PRINT 'Seeding MyTest statuses.';
BEGIN TRY
BEGIN TRANSACTION
CREATE TABLE [MyTest].[#Status] (
[Id] int NOT NULL,
[StatusLabel] varchar (50) NOT NULL
);
dir /b *.pdf >filelist.txt
@marifrahman
marifrahman / getGithubProjects.js
Created September 29, 2017 03:17
Javascript to load all github projects
// Inspired by the code from http://jointheconversation.org
jQuery.githubUser = function(username, callback) {
jQuery.getJSON("https://api.github.com/users/" + username + "/repos?callback=?", callback);
}
jQuery.fn.loadRepositories = function(username) {
this.html("<span>Querying GitHub for repositories...</span>");
=IF(ISERROR(VLOOKUP(A14,Sheet2!B:B,1,FALSE)),"FILTER ME OUT","KEEP ME")
@marifrahman
marifrahman / index.html
Created December 12, 2014 04:02
jQuery Multiple email address Validation // source http://jsbin.com/pomofoc
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="jQuery Multiple email address Validation" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8/jquery.validate.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
body {
background-image: url('http://lorempixel.com/output/technics-q-c-1244-1096-2.jpg');
background-repeat: no-repeat;
background-size: cover;
text-align:center;
}
#maindiv {
width:900px;
height:500px;
* {
margin: 0;
padding: 0;
}
body {
background: url(http://i47.tinypic.com/2090r3c.jpg) no-repeat;
}
h1 {
font:small-caps bold 25px Times New Roman;
text-transform:capitalize;
@marifrahman
marifrahman / SQL_Single _from_multiple_row
Created August 5, 2013 03:08
SQL to create single record from Multiple rows
Scenario :
SubjectID StudentName
---------- -------------
1 Mary
1 John
1 Sam
2 Alaina
2 Edward
To
@marifrahman
marifrahman / SQL_server_get_duplicate
Created July 18, 2013 03:08
Get duplicate record in a column for each group
use *DATABASE_NAME*
go
SELECT *YOUR_FIELD*, COUNT(*) AS dupes
FROM *YOUR_TABLE_NAME*
GROUP BY *YOUR_FIELD*
HAVING (COUNT(*) > 1)