Skip to content

Instantly share code, notes, and snippets.

@jun9
jun9 / txt2mp3.sh
Created July 23, 2022 19:14 — forked from ivanistheone/txt2mp3.sh
This script converts a plain text file, e.g. article.txt into a mp3 audiobook using the MacOS text-to-speech accessibility command-line tool `say`. Adjust the `VOICE` and `RATE` parameters to customize to your liking. Note this requires running on MacOS.
#!/usr/bin/env bash
set -e
# This script converts any text file into a mp3 audiobook using the MacOS
# text-to-speech accessibility command-line tool `say`.
# Adjust the `VOICE` and `RATE` parameters to customize to your liking:
VOICE="Alex"
RATE="295" # pretty fast
if [ $# -eq 0 ]; then
@jun9
jun9 / generate-client.sh
Created December 7, 2021 05:09 — forked from judge2020/generate-client.sh
Generate a new client configuration for WireGuard
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "$0 client-name"
exit 1
fi

Neural Network XOR

Widget Menagerie

@jun9
jun9 / index.html
Created December 4, 2015 11:50 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/yotuloboke
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script src="http://modernizr.com/downloads/modernizr-latest.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
table.oct {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jun9
jun9 / points.r
Last active December 24, 2015 21:19 — forked from hadley/points.r
library(ggplot2)
library(scales)
library(maps)
library(plyr)
mid_range <- function(x) mean(range(x, na.rm = TRUE))
centres <- ddply(county_df, c("state", "county"), summarise,
lat = mid_range(lat),
long = mid_range(long)
)

This parallel coordinates visualization of cars from the ‘70s and ‘80s demonstrates one of D3 2.5.0’s new interactive features: the brush component. By clicking and dragging along any axis, you can specify a filter for that dimension. The brush component is also used in the updated scatterplot matrix example.

@jun9
jun9 / README.md
Created May 22, 2013 18:16 — forked from mbostock/.block

The first 15 seconds of the D3 show reel. See full video at http://vimeo.com/29862153. Includes seamless transitions between the following visualization types:

  • lines
  • horizons
  • areas
  • stacked areas
  • streamgraph
  • overlapping areas
  • grouped bars
  • stacked bars
@jun9
jun9 / README.md
Created May 22, 2013 18:11 — forked from mbostock/.block

The scatterplot matrix visualizations pairwise correlations for multi-dimensional data; each cell in the matrix is a scatterplot. This example uses Anderson's data of iris flowers on the Gaspé Peninsula. Scatterplot matrix design invented by J. A. Hartigan; see also R and GGobi. Data on Iris flowers collected by Edgar Anderson and published by Ronald Fisher.