As configured in my dotfiles.
start new:
tmux
start new with session name:
| // early experiments with node had mysterious double requests | |
| // turned out these were for the stoopid favicon | |
| // here's how to short-circuit those requests | |
| // and stop seeing 404 errors in your client console | |
| var http = require('http'); | |
| http.createServer(function (q, r) { | |
| // control for favicon |
| /* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101 | |
| * 2017-12-05 | |
| * | |
| * -- T. | |
| */ | |
| #define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
| #include <stdlib.h> | |
| #include <stdio.h> |
| import javafx.application.Application; | |
| import javafx.beans.value.*; | |
| import javafx.concurrent.Worker; | |
| import javafx.event.*; | |
| import javafx.scene.*; | |
| import javafx.scene.control.*; | |
| import javafx.scene.effect.BoxBlur; | |
| import javafx.scene.input.MouseEvent; | |
| import javafx.scene.layout.*; | |
| import javafx.scene.paint.Color; |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| import java.util.concurrent.CountDownLatch; | |
| import javax.swing.SwingUtilities; | |
| import javafx.application.Platform; | |
| import javafx.embed.swing.JFXPanel; | |
| import org.junit.Rule; | |
| import org.junit.rules.TestRule; | |
| import org.junit.runner.Description; |
| #include <mutex> | |
| #include <condition_variable> | |
| using namespace std; | |
| class semaphore | |
| { | |
| public: | |
| semaphore(int count_ = 0) : count{count_} | |
| {} |
| #include "sys/types.h" | |
| #include "sys/sysinfo.h" | |
| int parseLine(char *line) { | |
| // This assumes that a digit will be found and the line ends in " Kb". | |
| int i = strlen(line); | |
| const char *p = line; | |
| while (*p < '0' || *p > '9') p++; | |
| line[i - 3] = '\0'; | |
| i = atoi(p); |