A Pen by Captain Anonymous on CodePen.
- Open the application such that you see the icon on your screen.
- Open Activity Monitor
- Double click the name of the application (i.e. Finder or System Preferences)
- Select "Open Files and Ports"
- Copy the output to a file and then
grep
for.icns
Similarly you could run this command, but it may take several minutes to complete:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Possible approaches to rendering web components on the server... | |
Server side DOM library (JSDOM alternative) that supports custom elements: | |
https://www.npmjs.com/package/happy-dom | |
https://medium.com/@treshugart/%C3%A5server-side-rendering-web-components-e5df705f3f48 | |
Approach is based on this zip: | |
https://gist.github.com/justinfagnani/936791248120749ff1f8188f1f4064d9 | |
Share a template between client side code and server side code: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="contact-form" action="//formspree.io/[email protected]" method="post"> | |
<input type="text" name="Name" placeholder="Name" required> | |
<input type="email" name="Email" placeholder="Email" required> | |
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea> | |
<!-- CONFIG --> | |
<input class="is-hidden" type="text" name="_gotcha"> | |
<input type="hidden" name="_subject" value="Subject"> | |
<input type="hidden" name="_cc" value="[email protected]"> | |
<!-- /CONFIG --> | |
<input class="submit" type="submit" value="Send"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
$ mkdir sass_gulp_workshop
cd
into the new directory- Initialize NPM:
$ npm init --yes
- Install gulp and gulp-sass packages:
$ npm install -D gulp gulp-sass browser-sync
- Update
package.json
'sscripts
section with this key-value pair:"scripts": { "dev": "gulp" }
- Recreate this file structure in this directory:
public
(directory)css
(directory)index.html
(file)
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='header'> | |
<h1>konstanzer schülerparlament</h1> | |
<svg | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:cc="http://creativecommons.org/ns#" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:svg="http://www.w3.org/2000/svg" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | |
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* World's simplest express server | |
* - used to serve index.html from /public | |
*/ | |
var express = require('express'); | |
var serveStatic = require('serve-static'); | |
var app = express(); | |
app.use(serveStatic(__dirname + '/public')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toJSON(node) { | |
let propFix = { for: 'htmlFor', class: 'className' }; | |
let specialGetters = { | |
style: (node) => node.style.cssText, | |
}; | |
let attrDefaultValues = { style: '' }; | |
let obj = { | |
nodeType: node.nodeType, | |
}; | |
if (node.tagName) { |
NewerOlder