$ sudo apt update
$ sudo apt upgrade
$ sudo apt install apache2
$ mkdir /mnt/c/dev/wwwroot
$ sudo ln -s /mnt/c/dev/wwwroot /var/www/public
<?php | |
/** | |
* File Manager Script | |
*/ | |
// Default language ('en' and other from 'filemanager-l10n.php') | |
$lang = 'en'; | |
// Auth with login/password (set true/false to enable/disable it) | |
$use_auth = true; |
// As always, user-agent detection is not recommended. | |
// Caveats apply, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent | |
mobileCheck: function() { | |
return /Mobi|Android/i.test(navigator.userAgent); | |
} |
$ npm install express serve-static
heroku.js
on at the root directory of a Vue.js project:const express = require('express');
const serveStatic = require("serve-static")
const path = require('path');
version: '3' | |
services: | |
wordpress: | |
image: wordpress:latest | |
restart: always | |
links: | |
- mysql | |
ports: | |
- 8080:80 |
// uses https://github.com/markedjs/marked to read markdown files to html | |
// uses jQuery because we're on old angular version | |
var checkUpdatesFile = function() { | |
$.ajax({ | |
url: '/static/updates.md' | |
}).done(function(data){ | |
var updateText = data; | |
// check/store in localStorage for updated text from updates.md |
**NOTE: After re-installing WSL, node/npm is spouting errors on permissions on the filesystem
sudo umount /mnt/c sudo mount -t drvfs C: /mnt/c -o metadata
Seen from here: microsoft/WSL#1932
body { | |
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; | |
font-size: 14px; | |
line-height: 1.5; | |
} | |
code { | |
font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace; | |
font-size: 12px; | |
} |
#!/bin/sh | |
# http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
# usage: ./gifenc.sh [input].mov [output].gif | |
palette="palette.png" | |
filters="fps=15,scale=-1:-1:flags=lanczos" | |
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette |
var App = angular.module('App', []); |