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
//GET PARAMETER IN url query (www.google.com?search='hi') | |
exports.weather = function (req, res) { | |
res.setHeader("Access-Control-Allow-Origin", "*"); | |
res.setHeader('Content-Type', 'application/json'); | |
var place= req.query.q; | |
//API Config | |
var url='http://ipapi.co/json'; |
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
package com.controller; | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.HashMap; |
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
$scope.sendmessage= function(from,to,msg,status){ | |
$.ajax({ | |
type: 'POST', | |
url: '<%=request.getContextPath()%>/MainController', | |
data: { | |
"from" : from, | |
"to" : to, | |
"message" : msg, | |
"action": "sendmsg", |
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
CREATE SEQUENCE notify_seq | |
INCREMENT BY 1 | |
NOCACHE | |
NOCYCLE; | |
DROP SEQUENCE notify_seq | |
CREATE TABLE NOTIFICATIONS( |
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.setHeader("Cache-Control","no-cache,no-store,must-revalidate");//HTTP 1.1 | |
response.setHeader("Pragma","no-cache"); //HTTP 1.0 | |
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server | |
if(session==null || session.getAttribute("user")==null){ | |
response.sendRedirect(request.getContextPath()+"/MainController"); | |
return; | |
} | |
%> |
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
sudo openssl x509 -inform DER -in certificate.cer -out certificate.crt | |
sudo mv certificate.crt /usr/share/ca-certificates/ | |
sudo mv certificate.crt /usr/local/share/ca-certificates/ | |
cd /usr/share/ca-certificates | |
sudo chmod 644 certificate.crt | |
sudo dpkg-reconfigure ca-certificates |
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
python3 -m pip install ipykernel | |
python3 -m ipykernel install --user |
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
# Ubuntu | |
dmesg | |
sudo dmesg --clear | |
sudo cat /var/log/kern.log | grep usb | |
sudo rm -rf /var/log/kern* | |
#old log files | |
sudo zcat /var/log/kern.log.2.gz | grep usb | |
sudo cat /var/log/syslog | grep usb |
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
https://www.jhipster.tech/configuring-a-corporate-proxy/ |
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
<html> | |
<body> | |
<h1>I feel lonely</h1> | |
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.3.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var socket = io.connect('http://' + document.domain + ':' + location.port); | |
socket.on('connect', function() { | |
socket.emit('connected'); |
OlderNewer