install the normal way:
wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb & > /dev/null
sudo apt-get update
sudo apt-get upgrade| #!/usr/bin/python | |
| import libvirt | |
| import sys | |
| # virDomainEventType is emitted during domain lifecycles (see libvirt.h) | |
| VIR_DOMAIN_EVENT_MAPPING = { | |
| 0: "VIR_DOMAIN_EVENT_DEFINED", | |
| 1: "VIR_DOMAIN_EVENT_UNDEFINED", | |
| 2: "VIR_DOMAIN_EVENT_STARTED", |
| var crypto = require('crypto'); | |
| // larger numbers mean better security, less | |
| var config = { | |
| // size of the generated hash | |
| hashBytes: 32, | |
| // larger salt means hashed passwords are more resistant to rainbow table, but | |
| // you get diminishing returns pretty fast | |
| saltBytes: 16, | |
| // more iterations means an attacker has to take longer to brute force an |
| 'use strict'; | |
| module.exports = function CustomError(message, extra) { | |
| Error.captureStackTrace(this, this.constructor); | |
| this.name = this.constructor.name; | |
| this.message = message; | |
| this.extra = extra; | |
| }; | |
| require('util').inherits(module.exports, Error); |
install the normal way:
wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb & > /dev/null
sudo apt-get update
sudo apt-get upgrade| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |
| from numpy import exp, array, random, dot | |
| training_set_inputs = array([[0, 0, 1], [1, 1, 1], [1, 0, 1], [0, 1, 1]]) | |
| training_set_outputs = array([[0, 1, 1, 0]]).T | |
| random.seed(1) | |
| synaptic_weights = 2 * random.random((3, 1)) - 1 | |
| for iteration in xrange(10000): | |
| output = 1 / (1 + exp(-(dot(training_set_inputs, synaptic_weights)))) | |
| synaptic_weights += dot(training_set_inputs.T, (training_set_outputs - output) * output * (1 - output)) | |
| print 1 / (1 + exp(-(dot(array([1, 0, 0]), synaptic_weights)))) |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <script src="main.js"></script> | |
| <meta charset="UTF-8"> | |
| <title>Tutorial</title> | |
| <style> | |
| html, body { | |
| margin: 0; | |
| padding: 0; |
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
| module.exports = { | |
| development: { | |
| client: 'postgresql', | |
| connection: { | |
| port: process.env.DATABASE_PORT, | |
| host: process.env.DATABASE_HOST, | |
| database: process.env.DATABASE_NAME, | |
| user: process.env.DATABASE_USER, | |
| password: process.env.DATABASE_ACCESS_KEY, | |
| }, |
Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.
The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W).
If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).
If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so