View README.md

Intro

This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.

Basics

After creating the server (droplet on DigitalOcean) log in with

View prime.py
def check_number():
give = int(input('Enter the number you want to check is prime or not : ')) # asking input andconverting it into integer since by default it will be string
give1 = int(give/2) # we know a number greater than the half of that number won't be able to divide it
# COnveriting into integer because the result will be float
for i in range(1,give1):
if give % i == 0:
print('THe number {} is prime'.format(give))
break # since there is now no pint in continuing the if loop
View to_md5.gs
function to_md5(text_to_md5) {
var toMD5 = text_to_md5 //md5sheet.getRange('b9').getValue()
var signature = Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, toMD5, Utilities.Charset.US_ASCII);
var signatureStr = '';
for (i = 0; i < signature.length; i++) {
var byte = signature[i];
if (byte < 0)
View gist:81cb0bc7177cd89605233303f3e396d1
jsWarrior.turn = function(warrior) {
// 前に敵がいたら
if(warrior.check() == "enemy") {
   // 敵をアタック
   warrior.attack();
// 前に敵がいなかったら
} else {
View US Airways-Ticketed purchase in advance
Enter file contents here- Clear to land 36, flaps down use rutter to apply brakes, use pedels to taxi and stop aircraft, insert card and
and hit buzzer; taxi.
View AVFoundationCamera.swift
// ViewController.swift
// AVFoundationCamera
import UIKit
import AVFoundation
class ViewController: UIViewController {
// セッション.
var mySession : AVCaptureSession!
// デバイス.
View public.js.index.js
var app1=angular.module('app1',[]);
app1.controller('cntrl1',function($scope,$http,$window){
$scope.signin= function () {
$http.post('/signin',$scope.emp).success(function(response){
if(response.message === 'success'){
$window.location.href='./ibm_homepage.html';
}
else{
$scope.message="username/password is wrong";
}
View node.express.mongo.jquery.delete.js
// DELETE
var requestDeleteUser = function(userid){
console.log("requestDeleteUser :" + userid);
url = endpointUsers + userid;
$.ajax({
method : "DELETE",
url: url,
success : function(data, textStatus, xhr){
console.log("done : " + data);
window.location.reload(true);
View 目录实用工具
import java.io.File;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
public final class Directory {