Skip to content

Instantly share code, notes, and snippets.

View MacKentoch's full-sized avatar
👨‍💻

Erwan DATIN MacKentoch

👨‍💻
  • France
View GitHub Profile

How to create an https server?

1. generate a self-signed certificate, run the following in your shell:

openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem

This should leave you with two files, cert.pem (the certificate) and key.pem (the private key).

Installing Node using NVM on OSX

BEFORE STARTING

IMPORTANT: If you have previously installed node using HomeBrew, ensure that you uninstall it before you proceed:

brew uninstall --force node

To install NVM, clone to the Git repository

@MacKentoch
MacKentoch / intro.md
Created July 26, 2017 04:35 — forked from derhuerst/intro.md
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

@MacKentoch
MacKentoch / iterm2-solarized.md
Created July 26, 2017 20:29 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

convert input-image.png -density 300 -compress zip output-image.png
#import "RNAppStoreReview.h"
#import <Foundation/Foundation.h>
@implementation RNAppStoreReview
RCT_EXPORT_MODULE();
- (dispatch_queue_t) methodQueue
{
#ifndef AppRate_h
#define AppRate_h
#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#import <StoreKit/StoreKit.h>
var fetch = require('node-fetch');
var CloudKit = require("./cloudkit.js")
CloudKit.configure({
services: {
fetch: fetch
},
containers: [{
containerIdentifier: 'yourContainerIdentifier',
apiToken: 'yourAPItoken',
/////////////////
// BRIDGE
/////////////////
// Device.h
@import UIKit;
#import <React/RCTBridgeModule.h>
@interface Device : NSObject <RCTBridgeModule>

When you don't understand where your disk space is disapearing check:

  • Library/developer folder
  • local snapshots for time machine (even if it is disabled!)

A single time machine local snapshot can take 5Go to 10Go disk space (for example after a huge MacOS or Xcode update).

It is often said that disibling timemachine should trigger a cleaning from the system. But this is not true, at least in my experience (on macOS High Sierra).