Данная пошаговая инструкция поможет освоить основы на простом примере
Для справки
Сервер поднимался на Debian 8
c характеристиками:
CPU - 1 ядро x 500 МГц
{ | |
"printWidth": 100, | |
"tabWidth": 2, | |
"useTabs": false, | |
"semi": true, | |
"singleQuote": true, | |
"trailingComma": "es5", | |
"bracketSpacing": true, | |
"jsxBracketSameLine": false, | |
"arrowParens": "avoid", |
If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:
$ git config --global commit.gpgsign true
([OPTIONAL] every commit will now be signed)$ git config --global user.signingkey ABCDEF01
(where ABCDEF01
is the fingerprint of the key to use)$ git config --global alias.logs "log --show-signature"
(now available as $ git logs
)$ git config --global alias.cis "commit -S"
(optional if global signing is false)$ echo "Some content" >> example.txt
$ git add example.txt
$ git cis -m "This commit is signed by a GPG key."
(regular commit
will work if global signing is enabled)# sudo /sbin/rcvboxdrv -h | |
# Unloading modules: | |
# Loading modules: modprobe: FATAL: Module vboxnetadp not found in directory /lib/modules/4.4.3-1-ARCH | |
# modprobe: FATAL: Module vboxnetflt not found in directory /lib/modules/4.4.3-1-ARCH | |
# modprobe: FATAL: Module vboxpci not found in directory /lib/modules/4.4.3-1-ARCH | |
# modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.4.3-1-ARCH | |
# Solution | |
# from https://forum.antergos.com/topic/818/can-t-run-my-vitualbox/4 |
/*jslint devel: true, browser: true, es5: true */ | |
/*global Promise */ | |
function imgLoad(url) { | |
'use strict'; | |
// Create new promise with the Promise() constructor; | |
// This has as its argument a function with two parameters, resolve and reject | |
return new Promise(function (resolve, reject) { | |
// Standard XHR to load an image | |
var request = new XMLHttpRequest(); |
package main | |
import ( | |
"image" | |
_ "image/gif" | |
_ "image/jpeg" | |
_ "image/png" | |
"io" | |
"mime" |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888, | |
mimeTypes = { | |
"html": "text/html", | |
"jpeg": "image/jpeg", | |
"jpg": "image/jpeg", | |
"png": "image/png", |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
#!/usr/bin/env bash | |
# This script fetches and builds libx264, libav, rtmpd and their dependencies. | |
# you may have to add /usr/local/lib to /etc/ld.so.conf | |
# BASEDIR = build directory (default current dir) | |
# PREFIX = install directory (default /usr/local) | |
if [ -z "$BASEDIR" ]; then | |
BASEDIR=`pwd` | |
fi |