- Project (Drupal) is served on
/var/www/htmlin the Vagrant box - Local project files location:
c:\Users\username\Work\projects\my-project\repo\html - Guest machine IP is 10.0.2.2 (if this doesn't work, run
route -neein the VM and look for the gateway address)
This file contains hidden or 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 React, { Component } from 'react'; | |
| import { | |
| Collapse, | |
| Navbar, | |
| NavbarToggler, | |
| NavbarBrand, | |
| Nav, | |
| NavItem, | |
| NavLink, | |
| Container, |
This file contains hidden or 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 main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
- download and install java
cd /opt
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jre-8u102-linux-x64.rpm"
rpm -Uvh jre-8u102-linux-x64.rpm
This file contains hidden or 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
| # Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html | |
| # Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1 | |
| # Install pandoc and asciidoctor | |
| $ sudo apt install asciidoctor | |
| $ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb | |
| $ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb | |
| # Convert asciidoc to docbook using asciidoctor |
This file contains hidden or 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
| /* | |
| Author: Jonathan Lurie - http://me.jonathanlurie.fr | |
| License: MIT | |
| The point of this little gist is to fix the issue of losing | |
| typed arrays when calling the default JSON serilization. | |
| The default mode has for effect to convert typed arrays into | |
| object like that: {0: 0.1, 1: 0.2, 2: 0.3} what used to be | |
| Float32Array([0.1, 0.2, 0.3]) and once it takes the shape of an | |
| object, there is no way to get it back in an automated way! |
This file contains hidden or 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
| /* | |
| * Copyright (C) 2017 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
This file contains hidden or 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
| <?php | |
| // app/Http/Middleware/Cors.php | |
| // It's possible to generate the file with artisan (see comment) | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class Cors | |
| { |