This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Response with null and empty values -- NOT RECOMMENDED, JUST FOR REPRESENTATION PURPOSE -- | |
{ | |
"employeeId": 12345, | |
"firstName": "Sunit", | |
"lastName": "Parekh", | |
"mobile": null, | |
"addresses": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Status: 200 | |
Total-Count: 100 | |
Next-Page: true | |
Content-Type: application/json | |
[ | |
{ | |
"employeeId":123456, | |
"firstName": "Sunit", | |
"lastName": "Parekh", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Status: 404 | |
Content-Type: application/json | |
{ | |
"code": "NOT_FOUND", | |
"message": "Oops! Requested employee 123456 not found." | |
} | |
Status: 400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Status: 200 | |
Content-Type: application/json | |
{ | |
"employeeId":123456, | |
"firstName": "Sunit", | |
"lastName": "Parekh", | |
"gender": "Male", | |
"hireDate": "2012-01-01", | |
"birthDate": "1990-01-01", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.dumbster.smtp.SimpleSmtpServer; | |
import com.dumbster.smtp.SmtpMessage; | |
import org.junit.Test; | |
import static org.hamcrest.Matchers.equalTo; | |
import static org.junit.Assert.assertThat; | |
public class TestEmail { | |
@Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repos=( | |
"/c/projects/project-1" | |
"/c/projects/project-2" | |
"/c/projects/project-3" | |
) | |
echo "" | |
echo "Getting latest for" ${#repos[@]} "repositories using pull --rebase" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repos=( | |
"/c/projects/project-1" | |
"/c/projects/project-2" | |
"/c/projects/project-3" | |
) | |
echo "" | |
echo "Checking" ${#repos[@]} "repositories for status" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-12345678-1', 'example.com'); | |
ga('send', 'pageview'); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://gist.github.com/sunitparekh/11284813.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe | |
id="ytplayer" type="text/html" | |
width="768" height="432" | |
src="//www.youtube.com/embed/U8GBXvdmHT4?html5=1" | |
frameborder="0" allowfullscreen autohide="1" rel="0" | |
/> |
NewerOlder