Skip to content

Instantly share code, notes, and snippets.

View ndrsllwngr's full-sized avatar
🧘

Andreas Ellwanger ndrsllwngr

🧘
View GitHub Profile
@ndrsllwngr
ndrsllwngr / enum_display.rs
Created June 22, 2021 20:55 — forked from bjorndown/enum_display.rs
Rust: Implement fmt::Display for enum
use std::fmt;
#[derive(Copy,Clone)]
enum CellState { Dead, Alive }
impl fmt::Display for CellState {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let printable = match *self {
CellState::Alive => 'x',
CellState::Dead => ' ',
@ndrsllwngr
ndrsllwngr / osx_install.sh
Created September 18, 2018 20:03 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@ndrsllwngr
ndrsllwngr / fix-homebrew-npm.md
Created June 1, 2016 11:21 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@ndrsllwngr
ndrsllwngr / springer-free-maths-books.md
Created December 28, 2015 21:22 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@ndrsllwngr
ndrsllwngr / gulpfile.js
Created December 7, 2015 16:12
My web development gulpfile
var browserSync = require('browser-sync');
var del = require('del');
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
var runSequence = require('run-sequence');
var paths = {
images: "source/**/*.{png,svg,jpg}",
styles: "source/**/*.{css,scss}",
templates: "source/**/*.swig",