Skip to content

Instantly share code, notes, and snippets.

I have a huge backlog of notifications, trying hard to work my way thru them!

Linus Unnebäck LinusU

I have a huge backlog of notifications, trying hard to work my way thru them!
View GitHub Profile
View Headless Setup of Raspberry Pi Zero W (Raspberry Pi 3 Wireless) (macOS).markdown

#Headless Setup of Raspberry Pi Zero W (Raspberry Pi 3 Wireless) (macOS)

  1. Formatt the Micro SD card - Open a terminal and type 'diskutil list'. Find your card and copy the disk name (For example: /dev/disk4). Format the card with diskutil eraseDisk ExFat temp disk4(Use your disk here)
  2. Download Raspbian - wget
  3. Unmount the SD card - diskutil unmountDisk /dev/disk4 or whatever your disk path is
  4. Mount the Raspbian image to the card - sudo dd if=PATH-TO-RASPBIAN-IMAGE of=/dev/disk4` or whatever your disk path is
  5. Enable SSH on the Pi - cd /volumes && ls. You should see a boot partition from the SD card cd boot && touch ssh
  6. Setup WiFi on the PI - While still in the boot partition of the card type nano wpa_supplicant.conf and enter network={ ssid="YOUR-SSID" psk="YOUR-WIFI-PASSWORD" }
  7. Boot the PI - Unmount the card diskutil unmountDisk /dev/disk4 (or whatever your disk path is) and put it in the
paragonie-scott /
Last active Jun 12, 2020
Suggestions for a Secure JOSE Alternative (or Protocol Upgrade)

Changes to JOSE that will prevent insecurity



Drop the alg header

Neither JOSE users nor JOSE library designers should be required to understand cryptography primitives. At a lower level, this can lead to badly implemented primitives. On a higher level, this can lead to reasoning by lego.

View convert-aax-to-m4a.cmd
@echo off
setlocal enableextensions
chcp 65001
set input=%1
set device=%2
set loglevel=quiet
for %%i in ("%~f1") do set dirname=%%~dpi
for %%i in ("%~f1") do set extension=%%~xi
set tempfile=%dirname%%RANDOM%-temp.m4a
emaloney /
Last active Nov 15, 2019
A simplified notation for avoiding the weak/strong dance with closure capture lists

Simplified notation for avoiding the [weak self]/strongSelf dance with closures

  • Proposal: TBD
  • Author: Evan Maloney
  • Status: Draft
  • Review manager: TBD


Frequently, closures are used as completion callbacks for asynchronous operations, such as when dealing with network requests. It is quite common to model these sorts of operations in such a way that an object instance represents a request/response transaction, for example:

bellbind / binding.gyp
Last active Oct 22, 2015
[nodejs]Making native extension as ObjectWrap for node-4 with nan-2
View binding.gyp
# -*- mode: python -*-
"targets": [
"include_dirs": ["<!(node -e \"require('nan')\")"],
"target_name": "NanObjectWrap",
"sources": [
"conditions": [
thlorenz /
Last active Oct 13, 2016
Script to update Node.js addons to work with nan 2.0.x and thus with iojs v3.x (gets you 90% there)
justmoon / custom-error.js
Last active Aug 10, 2020 — forked from subfuzion/
Creating custom Error classes in Node.js
View custom-error.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor); =;
this.message = message;
this.extra = extra;
require('util').inherits(module.exports, Error);
LinusU /
Last active Jun 29, 2020 — forked from apla/icons_and_splash.js
Icons and Splash images for your Cordova project. (with iOS 7 support)


Install cordova into node_modules

npm install cordova

Add icons_and_splash.js

You can’t perform that action at this time.