Skip to content

Instantly share code, notes, and snippets.

View wout's full-sized avatar
🕳️

Wout wout

🕳️
View GitHub Profile
@wout
wout / CmderZSH.md
Created May 26, 2019 17:24 — forked from dfontana/CmderZSH.md
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder
@wout
wout / gist:df49798c8eeaff3cdede0013f5f14a24
Created January 21, 2019 10:31
Dell XPS 13 won't suspend
Jan 21 11:19:25 rossy NetworkManager[1402]: <info> [1548065965.3426] manager: sleep: sleep requested (sleeping: no enabled: yes)
Jan 21 11:19:25 rossy NetworkManager[1402]: <info> [1548065965.3428] device (B4:8B:19:6B:0E:38): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jan 21 11:19:25 rossy NetworkManager[1402]: <info> [1548065965.3431] manager: NetworkManager state is now ASLEEP
Jan 21 11:19:25 rossy NetworkManager[1402]: <info> [1548065965.3433] device (wlp2s0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
Jan 21 11:19:25 rossy /usr/lib/gdm3/gdm-x-session[3112]: (II) event13 - ELAN24EE:00 04F3:24EE: device removed
Jan 21 11:19:25 rossy gnome-shell[3267]: + combinators are not supported
Jan 21 11:19:25 rossy gnome-shell[3267]: + combinators are not supported
Jan 21 11:19:25 rossy NetworkManager[1402]: <info> [1548065965.3761] device (wlp2s0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-st
@wout
wout / gist:a92ceb50716586a6e62f
Last active August 29, 2015 14:02
Round path directives to a given amount of decimals
// svg.compress.js 0.0.1 - Copyright (c) 2014 Wout Fierens - Licensed under the MIT license
SVG.extend(SVG.Path, {
// Round path directives to a given amount of decimals
compress: function(decimals) {
decimals = eval('1e' + decimals)
for (var n, i = this.array.value.length - 1; i >= 0; i--)
for (n = this.array.value[i].length - 1; n >= 1; n--)
this.array.value[i][n] = ~~(this.array.value[i][n] * decimals) / decimals
@wout
wout / gist:6352742
Created August 27, 2013 12:13
Textflow plugin for svg.js
// svg.textflow.js 0.8 - Copyright (c) 2013 Wout Fierens - Licensed under the MIT license
SVG.Textflow = function() {
this.constructor.call(this, SVG.create('text'))
/* define default style */
this.styles = {
'font-size': 16
, 'font-family': 'Helvetica, Arial, sans-serif'
, 'text-anchor': 'start'
@wout
wout / gist:5188265
Last active July 29, 2021 18:04
Zoom in and out with svg viewbox for http://svgjs.dev
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>svg.js</title>
<style type="text/css" media="screen">
#buttons {
position: absolute;
right: 0;