create user set the user no login jail the user in the sftp config chmod 755 . -R chown -R fps-data:sftpusers . Test with cyberduck or
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
### MONGO | |
db.createUser({user: "mongo-admin", pwd: "password", roles:[{role: "root", db: "admin"}]}) | |
mongo -u dsals -p --authenticationDatabase dbname | |
### Create MYSWL User and grant the user ready only. | |
create user 'username'@'%' identified by ‘password‘; | |
grant select, show view on database_name.* to 'username'@'%' identified by 'password'; |
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 rm /var/lib/apt/lists/lock | |
sudo rm /var/cache/apt/archives/lock | |
sudo rm /var/lib/dpkg/lock |
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
image: node:6.4 | |
stages: | |
- build | |
- deploy | |
build site: | |
stage: build | |
script: | |
- npm install --progress=false |
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.fazecast.jSerialComm.SerialPort; | |
public class clean { | |
public static void main(String[] args) { | |
SerialPort[] ttyPort = SerialPort.getCommPorts(); | |
for (SerialPort i: ttyPort) { | |
i.openPort(); | |
System.out.println(i.bytesAvailable()); |
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
curl -XPOST http://localhost:9200/test/articles/1 -d '{ | |
"content": "The quick brown fox" | |
}' | |
curl -XPOST http://localhost:9200/test/articles/2 -d '{ | |
"content": "What does the fox say?" | |
}' | |
curl -XPOST http://localhost:9200/test/articles/3 -d '{ | |
"content": "The quick brown fox jumped over the lazy dog" | |
}' | |
curl -XPOST http://localhost:9200/test/articles/4 -d '{ |
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
from flask import Flask, render_template, flash, url_for | |
import markdown | |
import os | |
from werkzeug import cached_property | |
from flask_flatpages import FlatPages | |
import yaml | |
DEBUG = True |
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
rec=0 | |
def autoIncrement(something): | |
global rec | |
pStart = 1 #adjust start value, if req'd | |
pInterval = 1 #adjust interval value, if req'd | |
if (rec == 0): | |
rec = pStart | |
else: | |
rec = rec + pInterval |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Leaflet Map</title> | |
<meta charset="utf-8" /> | |
<link | |
rel="stylesheet" | |
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" | |
/> | |
</head> |