Skip to content

Instantly share code, notes, and snippets.

@ackuser
ackuser / openconnect.md
Created February 19, 2021 07:13 — forked from moklett/openconnect.md
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@ackuser
ackuser / flushroute.sh
Created February 16, 2021 09:23 — forked from jckw/flushroute.sh
Fix for OpenVPN/ Tunnelblick: `Can't assign requested address`
# en1 for WLAN
# en0 for Ethernet
sudo ifconfig en1 down
sudo route flush
sudo ifconfig en1 up
import { TestBed, inject } from '@angular/core/testing';
import {
HttpClientTestingModule,
HttpTestingController
} from '@angular/common/http/testing';
import {
HttpClient,
} from '@angular/common/http';
import { SampleService } from './sample.service';
@ackuser
ackuser / homebrew-permissions-issue.md
Created September 28, 2020 12:05 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@ackuser
ackuser / .block
Created September 2, 2020 17:16 — forked from mbostock/.block
Bar Chart with Negative Values
license: gpl-3.0
redirect: https://observablehq.com/@d3/diverging-bar-chart
@ackuser
ackuser / dropshadow.js
Created August 28, 2020 08:05 — forked from cpbotha/dropshadow.js
d3.js drop shadow example
// d3.js drop shadow example
// put together by http://charlbotha.com/
var items = [
{x : 50, y : 10},
{x : 100, y: 170},
{x : 320, y: 70}
];
// we can increase this, everything will scale up with us
export function logger( reducer ) {
return function newReducer( state, action ) {
console.group(action.type);
const nextState = reducer(currentState, action);
console.log(`%c prev state`, `color: #9E9E9E; font-weight: bold`, state);
console.log(`%c action`, `color: #03A9F4; font-weight: bold`, action);
console.log(`%c next state`, `color: #4CAF50; font-weight: bold`, nextState);
console.groupEnd();
return nextState;
}
@ackuser
ackuser / nativeJavaScript.js
Created June 9, 2020 07:05 — forked from alexhawkins/nativeJavaScript.js
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests

I’m looking forward to the Sass Fundamentals workshop! A few notes to ensure you’re set up in advance are below.

See you soon!

Mike

Node.js

You’ll need a relatively recent version (v4.5 or newer, v7 ideally) of node.js installed. On OS X, a great way of doing this without disturbing your existing dev environment is to install NVM. Installation instructions are here.

@ackuser
ackuser / line-chart.component.scss
Created March 3, 2020 18:26
Style of angular d3 visual line chart component
/* 13. Basic Styling with CSS */
/* Style the lines by removing the fill and applying a stroke */
::ng-deep .line {
fill: none;
stroke: #ffab00;
stroke-width: 3;
}
::ng-deep .overlay {