Skip to content

Instantly share code, notes, and snippets.

View timgreen's full-sized avatar

Tim Green timgreen

  • Sydney, Australia
View GitHub Profile
@timgreen
timgreen / enable_scala_kernel.sh
Last active September 20, 2020 13:29
Scala in Colab
# Based on https://gist.github.com/shadaj/aaac98b690cfeb0cbd891bfe3ce5725d#file-scala-in-colab-template-ipynb
SCALA_VERSION=2.12.8
ALMOND_VERSION=0.3.0+16-548dc10f-SNAPSHOT
[ -f /usr/local/share/jupyter/kernels/scala/kernel.json ] && exit
curl -Lo coursier https://git.io/coursier-cli
chmod +x coursier
./coursier bootstrap \
@krisselden
krisselden / trace-to-mp4.js
Last active July 4, 2022 23:26
Make an mp4 out of a Chrome DevTools trace with screenshots.
const fs = require('fs');
const path = require('path');
const spawn = require('child_process').spawn;
const FPS = 60;
const MICROSEC_PER_FRAME = Math.round(1000000 / FPS);
if (process.argv.length < 3) {
console.log(`node ${path.relative('.', process.argv[1])} [DevToolsProfile]`);
process.exit(1);
}
let traceFile = path.resolve(process.argv[2]);
@enpassant
enpassant / vimwiki2html.md
Last active November 15, 2023 01:04
Convert VimWiki to HTML (markdown, mediawiki)

With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.

Usage: In the vim list section of the .vimrcfile, include options:

let g:vimwiki_list = [{'path': ‘your_wiki_place',
  \ 'path_html': ‘wiki_html_location’,
  \ 'syntax': 'markdown',
 \ 'ext': '.md',
@t-mart
t-mart / netrw quick reference.md
Last active April 30, 2024 22:30
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
function! s:escape(path)
return substitute(a:path, ' ', '\\ ', 'g')
endfunction
function! GitGrepHandler(line)
let parts = split(a:line, ':')
let [fn, lno] = parts[0 : 1]
execute 'e '. s:escape(fn)
execute lno
normal! zz
@mwhittaker
mwhittaker / README.md
Last active March 14, 2020 18:12
Google Cloud Platform
@colby
colby / imgur
Created April 5, 2015 00:35
A simple shell script to upload images to Imgur.
#!/usr/bin/env bash
# variables
img="$1"
tmp=/tmp/imgur
id='3e7a4deb7ac67da'
link='https://api.imgur.com/3/upload'
# functions
errcho() {
import com.twitter.util.{Future => TwFuture}
import scala.concurrent.{Future => ScFuture, promise => ScPromise}
implicit def twFutureToScala[T](twFuture: TwFuture[T]): ScFuture[T] = {
val prom = ScPromise[T]
twFuture.onSuccess { res: T =>
prom.success(res)
}
twFuture.onFailure { t: Throwable =>
prom.failure(t)
}
@leemars
leemars / product.md
Last active March 7, 2016 12:30
万熊家的后山洞 亲友团

最后更新时间: 2014.1.19 | 点击 这里 前往店铺

熊, 听说你创业出来开淘宝店了?

我是出来折腾创业了, 但不是开淘宝店啊... 淘宝店哪里有这么好开!! 根本养不活自己的好吗!!

  • 因为工作原因, 需要对淘宝卖家工具进行测试, 所以开了店铺
  • 因为开了店铺以后需要往店里填充点宝贝才能测试, 所以做了分销
  • 因为自己是个吃货, 所以挑了零食的分销, 给自己买点便宜零食吃
  • 既然可以给自己买, 不如搞个亲友团, 给大家提供点便宜零食也不错的感觉, 乐于助人嘛
@timgreen
timgreen / arch_kde_init_install.sh
Last active December 15, 2015 02:09
Arch KDE init install
#!/bin/bash
# \curl -L http://goo.gl/mA4qmE
pkgs=(
# X
xorg-server
xorg-server-utils
xorg-xinit
# archiver