This file contains hidden or 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
# GET VERSION | |
npm -v (or --version) | |
# GET HELP | |
npm help | |
npm | |
# CREATE PACKAGE.JSON | |
npm init | |
npm init -y (or --yes) |
This file contains hidden or 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.fasterxml.classmate.AnnotationConfiguration; | |
import org.hibernate.HibernateException; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import java.util.Properties; | |
/** | |
* Created by Developer on 1/7/17. | |
*/ |
This file contains hidden or 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
/** | |
* <p>This will be picked up in a Servlet 3 environment like Apache Tomcat 7. | |
* | |
* <p>This replaces <code>web.xml</code>. | |
* | |
*/ | |
public class MvcRestApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { | |
@Override protected Class<?> [] getRootConfigClasses() { |
This file contains hidden or 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
<?php | |
// Constants | |
$FIREBASE = "_YOUR_FIREBASE_URL_"; | |
$NODE_DELETE = "temperature.json"; | |
$NODE_GET = "temperature.json"; | |
$NODE_PATCH = ".json"; | |
$NODE_PUT = "temperature.json"; | |
// Data for PUT |
This file contains hidden or 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
function APNStoFCM(token) { | |
var body = { | |
application : 'com.your.app', | |
sandbox : true, | |
apns_tokens : [ | |
token | |
] | |
}; | |
var options = { |
This file contains hidden or 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
var xmlhttp = new XMLHttpRequest(); | |
var url = "http://api.twitch.tv/api/channels/lirik"; | |
xmlhttp.onreadystatechange = function() { | |
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { | |
var myArr = JSON.parse(xmlhttp.responseText); | |
myFunction(myArr); | |
} |