Skip to content

Instantly share code, notes, and snippets.

View ljungmark's full-sized avatar
🍻
/dance

ʟᴊᴜɴɢᴍ•ʀᴋ ljungmark

🍻
/dance
View GitHub Profile
@ljungmark
ljungmark / Turn off Mac built-in Apache
Last active April 9, 2018 06:33
Mac OSX's built in Apache may claim the 80 port for itself, rendering you unable to start your Docker environment.
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
@ljungmark
ljungmark / php.cmd
Created March 25, 2018 21:44
Upgrade PHP version on Mac
# 1. Check where your current PHP is located
> $ which php
# ...which will result in smoething like this
> $ /usr/local/bin/php
# 2. Unlink the current link of PHP
> $ unlink /usr/local/bin/php
# 3. Install PHP
# Change the PHP version on the end
# Unpublish last commit pushed to Github
# (where dd61ab32 is target commit)
git push origin +dd61ab32^:master
# Reset changes locally:
git reset --hard origin/master
curl https://phar.phpunit.de/phpunit.phar -L -o phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit
sudo chown -R $(whoami):admin /usr/local
.selector {
font-size: calc(14px + (100vw / 50));
}
@media screen and (min-width: 1200px) {
.selector {
font-size: calc(14px + (1200px / 50));
}
}

Keybase proof

I hereby claim:

  • I am ljungmark on github.
  • I am ljungmark (https://keybase.io/ljungmark) on keybase.
  • I have a public key ASDUf2JnEUvsMXMhULkB5OOM-iUXnPUEpdtCD70nd8st9Qo

To claim this, I am signing this object:

@ljungmark
ljungmark / object-watch.js
Created May 17, 2017 16:59 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@ljungmark
ljungmark / Empty HTML template
Last active May 17, 2017 16:59
Basic HTML5 Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Basic HTML5 Template</title>
<link rel="stylesheet" href="css/styles.css">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
</head>
@ljungmark
ljungmark / mandatory_parameter.js
Created September 24, 2016 01:38
Enforcing mandatory parameters
function mandatory() {
throw new Error('Missing parameter');
}
function foo(mustBeProvided = mandatory()) {
return mustBeProvided;
}