Skip to content

Instantly share code, notes, and snippets.

View xiaohutai's full-sized avatar

Xiao-Hu Tai xiaohutai

  • The Netherlands
View GitHub Profile
@xiaohutai
xiaohutai / 404.html
Created September 26, 2019 14:00 — forked from amcgregor/404.html
My own HTML5 boilerplate sans most of the code. Because there's too much Romulus-be-damned boilerplate, and people fail to realize almost none of it is in any way needed. For more details than you probably wanted, ref: https://tomhodgins.hashnode.dev/code-that-you-just-never-ever-need-to-write-cjpblnfff00km0ys149kbttbg
<!DOCTYPE html>
<html lang="en">
<title>Page Not Found</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<h1>Page Not Found</h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
@xiaohutai
xiaohutai / README.md
Created September 20, 2019 11:42 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@xiaohutai
xiaohutai / README.md
Created September 20, 2019 11:42 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {

Ik schrijf u in uw hoedanigheid als gegevensbeschermingsfunctionaris voor uw bedrijf.

Door een situatie waarin uw bedrijf mij zonder expliciete toestemming heeft aangemeld voor solliciaties bij bedrijven die geen relevantie houden tot mijn profiel heb ik zorgen over de verwerking van data binnen uw bedrijf.

Ik zou graag willen dat u van meet af aan weet dat ik binnen een maand antwoord verwacht op mijn verzoek, zoals vereist krachtens artikel 12, bij gebreke waarvan ik mijn verzoek zal doorzenden met een klachtbrief aan de bevoegde autoriteiten.

Gelieve het volgende te adviseren:

  1. Bevestig mij of mijn persoonlijke gegevens worden verwerkt. Als dit het geval is, geef me dan de categorieën persoonlijke gegevens die u over mij hebt in uw bestanden en databases.
  2. Vertel me in het bijzonder wat u over mij weet in uw informatiesystemen, al dan niet in databases, inclusief e-mail, documenten op uw netwerken of spraak of andere media die u opslaat.
@xiaohutai
xiaohutai / boltforms.bolt.yml
Last active August 22, 2018 10:29 — forked from ankedsgn/boltforms.bolt.yml
Maak een Honeypot dmv een hidden field in de boltforms config
form:
...
fields:
...
custom:
type: hidden
options:
label: 'Custom'
required: false
attr:
@xiaohutai
xiaohutai / Multiple Deploy Keys in GitHub.md
Created July 17, 2018 12:39 — forked from mcfdn/Multiple Deploy Keys in GitHub.md
Using multiple GitHub deploy keys on a single server with a single user

Using multiple GitHub deploy keys on a single server with a single user

Within GitHub it is possible to set up two types of SSH key - account level SSH keys and and repository level SSH keys. These repository level SSH keys are known in GitHub as deploy keys.

Deploy keys are useful for deploying code because they do not rely on an individual user account, which is susceptible to change, to “store” the server keys.

There is, however, an ‘issue’ with using deploy keys; each key across all repositories on GitHub must be unique. No one key can be used more than once. This becomes a problem when deploying to repositories to the same server with the same user. If you create two keys, the SSH client will not know which key to use when connecting to GitHub.

One solution is to use an SSH config file to define which key to use in which situation. This isn’t as easy as it seems.. you might try something like this:

@xiaohutai
xiaohutai / uploadSanitiser.php
Last active January 26, 2018 12:42 — forked from rossriley/uploadSanitiser.php
Bolt: Extending the upload handler with custom sanitiser
$app['upload'] = $app->share(
$app->extend(
'upload',
function ($uploadHandler) {
// Set max file size
$uploadHandler->addRule('size', ['max' => '2M'])
// Sanitize filename
$uploadHandler->setSanitizerCallback(

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@xiaohutai
xiaohutai / git patterns.md
Created September 10, 2016 12:36 — forked from wayspurrchen/git patterns.md
Useful Git Techniques

History

Show file at certain commit

git show <hash>:<file>

Show history of a file

git log -p <filename>