For a while, JSX
and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.
This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.
Set up web-mode
web-mode
provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.
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
#!/bin/bash | |
# Create lxc profile with apt caching | |
# Requires installing apt-cacher-ng to 10.0.4.1 (your host) | |
# Could be improved by making the actual apt cache host tunable | |
# Then use like: | |
# lxc launch -p default -p aptcache ubuntu:16.04 my-cached-container | |
NAME=aptcache | |
CACHE_IP=$(ip addr list lxdbr0 | grep -Po 'inet \K[\d.]+') | |
if ! ping -c 1 "$CACHE_IP" -w 1 >/dev/null 2>&1; then |
- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone [email protected]:<hash>.git # or with ssh
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
#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
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
<domain type='lxc'> | |
<name>REPLACE</name> | |
<memory>327680</memory> | |
<os> | |
<type>exe</type> | |
<init>/sbin/init</init> | |
</os> | |
<vcpu>1</vcpu> | |
<clock offset='utc'/> | |
<on_poweroff>destroy</on_poweroff> |