Skip to content

Instantly share code, notes, and snippets.

@nvasilakis
nvasilakis / screen.md
Last active June 2, 2020 20:34 — forked from fredrick/screen.md
GNU Screen Cheat Sheet

GNU Screen Cheat Sheet

Basics

Remember: in screen, all screen-related commands are prefixed by ctr-a (which means pressing ctrl and a together, and then pressing the followup character).

The 4 most basic commands (if you're new to screen, learn only these):

  • ctrl-a c -> create­ate new window
  • ctrl-a ctrl-a -> toggle between latest windows
  • ctrl-a " -> show all windows and choose using up/down arrows
  • ctrl-a d -> detach window
@nvasilakis
nvasilakis / partial-package.json
Created September 19, 2017 20:33 — forked from brianloveswords/partial-package.json
TypeScript autobuild and copy to clipboard. Useful for developing stuff where you can't actually access the content directly in a text editor (e.g. tampermonkey)
{
"scripts": {
"build": "tsc && npm run post-build",
"watch": "tsc-watch --onSuccess 'npm run post-build'",
"post-build": "rollup build/index.js --o build/bundle.js --f iife && cat src/prelude.js build/bundle.js | (pbcopy && osascript -e 'display notification \"Script copied to clipboard\" with title \"Script Builder\"' || echo 'copied script to clipboard')"
}
}
@nvasilakis
nvasilakis / Dockerfile
Created January 10, 2017 05:49 — forked from christianberg/Dockerfile
Sharing a unix socket between a Docker container and it's host
FROM ubuntu
RUN apt-get update
RUN apt-get install -y socat
VOLUME /foo
CMD socat UNIX-LISTEN:/foo/bar.sock -
/*
A simple new-line delimited JSON protocol with upgrades.
Receiving Usage:
protocol = require('./frame-protocol');
// parsing data
parser = protocol.Parser();
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"
The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment.
Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules.
1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted)
2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need:
a. sudo apt-get install openssh-server
b. sudo apt-get install libssl-dev
c. sudo apt-get install git
d. sudo apt-get install g++
e. sudo apt-get install make