Skip to content

Instantly share code, notes, and snippets.


Tamlyn Rhodes tamlyn

View GitHub Profile
gilrosenthal / install script
Created Jul 4, 2018 Install on Google Colab
View install script
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
ceejbot /
Last active Jun 9, 2020
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

View transpile-esnext-modules.js
const MODULE_DIR = /(.*([\/\\]node_modules|\.\.)[\/\\](@[^\/\\]+[\/\\])?[^\/\\]+)([\/\\].*)?$/g;
loader: 'babel-loader',
test: /\.jsx?$/,
include(filepath) {
if (filepath.split(/[/\\]/).indexOf('node_modules')===-1) return true;
let pkg, manifest = path.resolve(filepath.replace(MODULE_DIR, '$1'), 'package.json');
try { pkg = JSON.parse(fs.readFileSync(manifest)); } catch (e) {}
return !!(pkg.module || pkg['jsnext:main']);
kekru / Docker connect to remote
Last active Jan 26, 2021
Connect to another host with your docker client, without modifying your local Docker installation
View Docker connect to remote

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

onjin / docker-compose.yml
Created Sep 5, 2016
example docker compose for postgresql with db init script
View docker-compose.yml
image: postgres:9.4
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
richardscarrott / !
Last active Sep 9, 2020
react-enzyme - `shallow` vs `mount` vs `render` lifecycle methods
View !

An exploration of the different render methods available in react-enzyme.

dtomasi / default
Last active Jan 20, 2021
Brew Nginx PHP7
View default
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
henriquea /
Last active Jan 23, 2021
Setting Fish as your default shell on Mac OS X
$ brew install fish
$ echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
$ chsh -s `which fish`
pwenzel /
Last active Jan 19, 2021
Installing rbenv in a fish environment

Here we use Homebrew to install rbenv:

  1. brew update; and brew install rbenv ruby-build
  2. Add ~/.rbenv/shims to your PATH
  3. Include the contents of completions/ in your Fish config.
  4. Run rbenv install 2.2.2 and rbenv rehash
  5. Run rbenv global 2.2.2

Now you can run gem install bundler and bundle install within your Ruby project.

substack /
Created Mar 9, 2015
open open source boilerplate, adapted from levelup

OPEN Open Source Project


Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.