Skip to content

Instantly share code, notes, and snippets.

View gregorynicholas's full-sized avatar
💀
alter.

gregory nicholas gregorynicholas

💀
alter.
View GitHub Profile
#!/usr/bin/python
# Credit to frogor for the objc
from Foundation import NSBundle
import json
import objc
import os
import plistlib
import subprocess
@gregorynicholas
gregorynicholas / Three Wise Monkeys.md
Created September 28, 2019 16:17 — forked from malarkey/Three Wise Monkeys.md
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@gregorynicholas
gregorynicholas / GDPR.md
Created September 28, 2019 16:17
(Data) Protection Racket
/* CSS Custom Properties */
:root {
--font-family: 'Georgia', serif;
--font-family-alt: 'Helvetica', Arial, sans-serif;
--font-weight: 400;
--font-weight-bold: 700;
--font-weight-black: 900;
/* 3:4 perfect fourth scale */
@gregorynicholas
gregorynicholas / Contract Killer 3.md
Created September 28, 2019 16:16 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@gregorynicholas
gregorynicholas / README.md
Created September 28, 2019 16:15 — forked from ndarville/README.md
How to export and rehost your Tumblr site

How to export and rehost your Tumblr site

(Update: Version 3.2.0 of Jekyll looks like it's breaking a few things, so I've changed the guide to make you specifically install the version I was using, 3.1.3. I believe this is the issue: jekyll/jekyll#5145.)

You will be using jekyll-import to export your Tumblr site, Jekyll to (re)create it, and Surge to rehost it.

Update: You can also use Tumblr's native export feature in your blogs' individual settings. But rehosting that might be tricky. Read my comments below this post for how that works.

Setup and installation

REST Ideology & Rants

I am getting frustrated by the number of people calling any HTTP-based interface a REST API. Today’s example is the SocialSite REST API. That is RPC. It screams RPC. There is so much coupling on display that it should be given an X rating.

REST APIs must be hypertext-driven


Roy Fielding writes a PhD dissertation describing the architectural style of the World Wide Web. He coins the term ‘Representational State Transfer’ (REST) to describe it – after all, if you’re going to talk about something, you need to give it a name. Somehow, in a semantic shift of epic fail proportions, the term REST has also come to mean something completely different to most people, a ‘style’ of writing web services. This style has no agreed protocol.

Static Site Generators

A Static Site Generator is a program, that generates an HTML website as an output. ThisHTML website is then served through your web server, just like the old’n’days. This is usually achieved using template languages and code that separates out the layout of the website from its content and styles.

Advantages of a Static Site Generator?

  • Security – There’s no database layer, or rails/pylons layer of code so security excellent.
  • Performance – Under load, less memory / cpu usage to serve your website, so your website stays up longer
  • Have a copy of your content separate from your server
  • Easily move your website to another host – Copy and paste the HTML and re-route the domain name should you have one.
@gregorynicholas
gregorynicholas / callback_pattern.js
Created September 28, 2019 16:13 — forked from dypsilon/callback_pattern.js
The callback pattern found in many node.js functions.
var invokee1 = function(err, callback) {
// cant change this function
callback();
};
var invokee2 = function(err, optional1, optional2, callback) {
// work with optional 1 or optional 2
console.log(optional1);
console.log(optional2);
// cant change this function