Skip to content

Instantly share code, notes, and snippets.

View jukben's full-sized avatar

Jakub Beneš jukben

View GitHub Profile
@jukben
jukben / README.md
Created January 27, 2019 09:31
Create bootable USB under macOS

Convert the ISO

hdiutil convert kali-linux-light-2018.4-amd64.iso  -format UDRW -o kali.img

Get the USB disk

diskutil list
@jukben
jukben / docker_space_cheat_sheet.md
Created February 15, 2019 12:28 — forked from jalogut/docker_space_cheat_sheet.md
Cheat sheet to check disk usage on docker. Identify what takes most of your space

Total disk size configuration (Mac)

ls -klsh ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw

Total disk usage (Mac)

du -h ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw
@jukben
jukben / pre-commit.sh
Last active February 25, 2019 12:35
Pre commit Husky + Lint-staged with option to opt out
#!/bin/bash
# http://mywiki.wooledge.org/BashFAQ/105
set -e
if [[ $(git config --get husky.hooks) == "false" ]]; then exit 0; fi
yarn run lint-staged
@jukben
jukben / CachedLayer.js
Last active December 12, 2022 20:07
Custom Layer for react-leafleat with naive cache mechanism
import { withLeaflet, GridLayer } from "react-leaflet";
import L from "leaflet";
class Grid extends GridLayer {
createLeafletElement() {
const { url, cacheName } = this.props;
const Layer = L.TileLayer.extend({
createTile: (coords, done) => {
const { x, y, z } = coords;
/**
* Copyright (c) 2019-present, ProductBoard, Inc.
* All rights reserved.
*/
export default function transform(file, api) {
const j = api.jscodeshift;
const imports = j(file.source)
.find(j.ImportDeclaration)

Keybase proof

I hereby claim:

  • I am jukben on github.
  • I am jukben (https://keybase.io/jukben) on keybase.
  • I have a public key ASCrxSl-w7_8sf2Iev7n4R4xLnSwDnQFTqofvduxp9dNXAo

To claim this, I am signing this object:

@jukben
jukben / node
Created September 23, 2024 10:39
/usr/local/bin/node
#!/usr/bin/env fish
# Get the current Node.js version managed by nvm.fish
set nvm_current_version (nvm current)
# Check if a Node.js version is currently selected
if test "$nvm_current_version" = "none"
echo "Error: No Node.js version selected. Please use 'nvm use' to select a version."
exit 1
end