Skip to content

Instantly share code, notes, and snippets.

View benjaminapetersen's full-sized avatar
👾

Ben Petersen benjaminapetersen

👾
View GitHub Profile
@benjaminapetersen
benjaminapetersen / SS .htaccess file
Created October 1, 2013 02:06
SS debugging stuff...
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
<Files web.config>
Order deny,allow

Keybase proof

I hereby claim:

  • I am benjaminapetersen on github.
  • I am bpeterse (https://keybase.io/bpeterse) on keybase.
  • I have a public key whose fingerprint is 51E0 E285 60A2 3434 1FD6 1A63 3EB9 E105 2F68 C0E8

To claim this, I am signing this object:

@benjaminapetersen
benjaminapetersen / index.html
Created February 7, 2017 21:37
Thinking In React: Step 2
<div id="container">
<!-- This element's contents will be replaced with your component. -->
</div>
@benjaminapetersen
benjaminapetersen / linux_fun.md
Created April 5, 2017 17:59 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
@benjaminapetersen
benjaminapetersen / .eslintrc
Created July 19, 2017 18:41 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@benjaminapetersen
benjaminapetersen / clean-docker-for-mac.sh
Created July 20, 2017 20:19 — forked from MrTrustor/clean-docker-for-mac.sh
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@benjaminapetersen
benjaminapetersen / framework-sizes.md
Created August 28, 2017 13:38 — forked from Restuta/framework-sizes.md
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – Angular, Ember and React.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
var env = require('./environment.js');
// This is the configuration file showing how a suite of tests might
// handle log-in using the onPrepare field.
exports.config = {
seleniumAddress: env.seleniumAddress,
framework: 'jasmine',
specs: [
@benjaminapetersen
benjaminapetersen / headless.md
Created February 28, 2018 17:20 — forked from addyosmani/headless.md
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.