Are you over 18 and want to see adult content?
More Annotations
![Invisalign Milano - Dott. Andrea Bottino](https://www.archivebay.com/archive/58bc19b0-6fd0-48c1-96f2-b0d7c686e4c3.png)
Invisalign Milano - Dott. Andrea Bottino
Are you over 18 and want to see adult content?
![Melanie Morgan | award-winning radio talk show host, author, columnist, journalist, and TV anchor](https://www.archivebay.com/archive/5e0c8d77-5fee-4535-acbd-437653d7b473.png)
Melanie Morgan | award-winning radio talk show host, author, columnist, journalist, and TV anchor
Are you over 18 and want to see adult content?
![Bliss Bridal Salon | Wedding Dresses | Fort Worth & Dallas Texas](https://www.archivebay.com/archive/66b48e2b-3a31-45ce-be2e-9f255d7b2c1b.png)
Bliss Bridal Salon | Wedding Dresses | Fort Worth & Dallas Texas
Are you over 18 and want to see adult content?
![Team Collaboration Software | Miro, formerly RealtimeBoard](https://www.archivebay.com/archive/123ee9ad-887c-4d6e-b1ce-9bc38ee9e7df.png)
Team Collaboration Software | Miro, formerly RealtimeBoard
Are you over 18 and want to see adult content?
![The Bike Lane | Northern Virginia's One Stop Bike Shops](https://www.archivebay.com/archive/15c6a4bd-1ee7-4969-aa67-0eeaaf9a395a.png)
The Bike Lane | Northern Virginia's One Stop Bike Shops
Are you over 18 and want to see adult content?
![Compare best credit cards- low APR, rewards, bad credit, student and travel offers](https://www.archivebay.com/archive/145d38d8-25a6-48d2-8763-a9073f3af435.png)
Compare best credit cards- low APR, rewards, bad credit, student and travel offers
Are you over 18 and want to see adult content?
![Katheryn Watson | Digital Marketing Unit](https://www.archivebay.com/archive/2ab9fb2d-4058-48e8-8ce5-655fc1b2ded8.png)
Katheryn Watson | Digital Marketing Unit
Are you over 18 and want to see adult content?
![Best Dentist Near Me | Dental Clinic | Boon Dental](https://www.archivebay.com/archive/98a6c42c-5511-47a7-91ef-c268d32d6f85.png)
Best Dentist Near Me | Dental Clinic | Boon Dental
Are you over 18 and want to see adult content?
Favourite Annotations
![Welcome | highlittletonprimary](https://www.archivebay.com/archive/44400a50-23e0-4284-aac0-065356f59ed8.png)
Welcome | highlittletonprimary
Are you over 18 and want to see adult content?
![Muebles de diseño y calidad para hogar © Dormitorios, Salones y Auxiliar.](https://www.archivebay.com/archive/ea0b8ea2-3d9f-4c0d-8ae3-00c5ba6123b0.png)
Muebles de diseño y calidad para hogar © Dormitorios, Salones y Auxiliar.
Are you over 18 and want to see adult content?
![Overnight Prints for all your Online Printing needs, Business Cards and more](https://www.archivebay.com/archive/528f58c0-3076-443d-b0a6-32110cb3acc7.png)
Overnight Prints for all your Online Printing needs, Business Cards and more
Are you over 18 and want to see adult content?
![Food Hall | Orange County | Anaheim Packing District](https://www.archivebay.com/archive/47f03f37-717a-41a8-8693-e5f85b830c17.png)
Food Hall | Orange County | Anaheim Packing District
Are you over 18 and want to see adult content?
![Kongu Herbal Chicken – india's first antibiotic free chicken](https://www.archivebay.com/archive/183050f8-6682-4b52-98ff-7e196b59e8dc.png)
Kongu Herbal Chicken – india's first antibiotic free chicken
Are you over 18 and want to see adult content?
![Movimiento Político de Resistencia](https://www.archivebay.com/archive/5a0fd205-6d41-441a-8e3b-808c3c6dc114.png)
Movimiento Político de Resistencia
Are you over 18 and want to see adult content?
![Strona startowa – Fox Rzeszów – Serwis](https://www.archivebay.com/archive/53bfdb3c-83b9-409f-ab8a-06bb305c8281.png)
Strona startowa – Fox Rzeszów – Serwis
Are you over 18 and want to see adult content?
![Inventable | La electrónica simple y clara. Un blog de Gabriel Rapetti](https://www.archivebay.com/archive/63723831-f5bf-4118-885b-9a3b9e32b67e.png)
Inventable | La electrónica simple y clara. Un blog de Gabriel Rapetti
Are you over 18 and want to see adult content?
![• 4 Trucos para Dormir Bien: Todo lo que Debes Saber. ¡Te Sorprenderá!](https://www.archivebay.com/archive/bd928e96-04b1-483d-adfd-7034396cb295.png)
• 4 Trucos para Dormir Bien: Todo lo que Debes Saber. ¡Te Sorprenderá!
Are you over 18 and want to see adult content?
Text
PETER COLES
21M.361. One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians ), but was being run and expanded upon HTML5 JAVASCRIPT PIANO HTML5 Javascript Piano. This synth piano is written solely using HTML, JS, and CSS. It contains a small handful of synths with configurable decays, a looper, demo mode, visual mode, and a variety of colors. View controls by hitting the top-right button on the piano. CONVERT .MOV TO .MP4 WITH FFMPEG A simple one-liner with ffmpeg to convert a Quicktime MOV file to MP4. USE EMACS KEY BINDINGS IN VS CODE In VS Code go to Code > Preferences > Keyboard Shortcuts Switch to JSON view (flip doc icon) Take a look at the keybindings.json file from the emacs-mcx repo to see the rules it applies. As seen below, any commands that include “meta” in this file should be “alt” in your keyboard shortcuts JSON file. Enteryour overrides!
HOW TO DRAW MULTI-COLORED TEXT ON AN HTML5 The HTML5 canvas fillText method is very barebones. If you’re looking to write multi-colored or mixed font style text (even just bold or italicize a word), you’ll quickly realize that you need to make independent calls to fillText for each change in the text style.. Fortunately, this can be pulled off by taking advantage of the ctx.measureText(text) method, which you can use to track where ONLINE CSS UNMINIFIER A simple tool to unminify CSS. It’s useful if you want to look at a site’s CSS, but you can only get your hands on the minified version. It is very simple and also lets you specify tab with. The idea is partly inspired by existing javascript beautifiers and unminifiers. ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
HTTP COOKIES: WHAT'S THE DIFFERENCE BETWEEN MAX-AGE AND Expires sets an expiry date for when a cookie gets deleted. Max-age sets the time in seconds for when a cookie will be deleted (use this, it’s no longer 2009) Internet Explorer (ie6, ie7, and ie8) does not support “max-age”, while (mostly) all browsers support expires. HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files. HOW TRACKING SCRIPTS AFFECT PAGE LOADS… CAN TRACKING When you add a tracking script to your site, you are adding an additional script to your pages that will follow the same blocking rules as any script. This can be dangerous, because someone else’s server is hosting that script and if your servers are working fine, but something is wrong with their servers, it can affect page loads onyour
PETER COLES
21M.361. One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians ), but was being run and expanded upon HTML5 JAVASCRIPT PIANO HTML5 Javascript Piano. This synth piano is written solely using HTML, JS, and CSS. It contains a small handful of synths with configurable decays, a looper, demo mode, visual mode, and a variety of colors. View controls by hitting the top-right button on the piano. CONVERT .MOV TO .MP4 WITH FFMPEG A simple one-liner with ffmpeg to convert a Quicktime MOV file to MP4. USE EMACS KEY BINDINGS IN VS CODE In VS Code go to Code > Preferences > Keyboard Shortcuts Switch to JSON view (flip doc icon) Take a look at the keybindings.json file from the emacs-mcx repo to see the rules it applies. As seen below, any commands that include “meta” in this file should be “alt” in your keyboard shortcuts JSON file. Enteryour overrides!
HOW TO DRAW MULTI-COLORED TEXT ON AN HTML5 The HTML5 canvas fillText method is very barebones. If you’re looking to write multi-colored or mixed font style text (even just bold or italicize a word), you’ll quickly realize that you need to make independent calls to fillText for each change in the text style.. Fortunately, this can be pulled off by taking advantage of the ctx.measureText(text) method, which you can use to track where ONLINE CSS UNMINIFIER A simple tool to unminify CSS. It’s useful if you want to look at a site’s CSS, but you can only get your hands on the minified version. It is very simple and also lets you specify tab with. The idea is partly inspired by existing javascript beautifiers and unminifiers. ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
HTTP COOKIES: WHAT'S THE DIFFERENCE BETWEEN MAX-AGE AND Expires sets an expiry date for when a cookie gets deleted. Max-age sets the time in seconds for when a cookie will be deleted (use this, it’s no longer 2009) Internet Explorer (ie6, ie7, and ie8) does not support “max-age”, while (mostly) all browsers support expires. HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files. HOW TRACKING SCRIPTS AFFECT PAGE LOADS… CAN TRACKING When you add a tracking script to your site, you are adding an additional script to your pages that will follow the same blocking rules as any script. This can be dangerous, because someone else’s server is hosting that script and if your servers are working fine, but something is wrong with their servers, it can affect page loads onyour
PETER COLES
21M.361. One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians ), but was being run and expanded upon TETRIS - HTML5 - PETER COLES A simple implementation of tetris using the HTML5 canvas with the option to change how new pieces are selected between random, evil, nice, or individual shapes. 21M.361 - PETER COLES One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians), but was being run and expanded upon by Peter Whincop (assistant professor who was finishing a MAKING IMAGES BYTE-BY-BYTE IN JAVASCRIPT 1. Bytes. A byte is 8 bits, 2^8 = 256 possible values, as you all know that's conveniently represented as two hex characters—0x00 is 0 and 0xff is 255. In JavaScript you can write that with a string as such: '\x00' or '\xff' or even '\xff\x00\x00' which can represent the RGB value for red. To create byte strings dynamically, you can use APPEND ARRAY OF JQUERY ELEMENTS As of jQuery 1.8, Nov 2012, the most efficient way to append a list of jQuery elements to the DOM is by simply passing the array to jQuery.append. Please ignore out-of HOW TRACKING SCRIPTS AFFECT PAGE LOADS… CAN TRACKING When you add a tracking script to your site, you are adding an additional script to your pages that will follow the same blocking rules as any script. This can be dangerous, because someone else’s server is hosting that script and if your servers are working fine, but something is wrong with their servers, it can affect page loads onyour
INLINING JSON IN A JEKYLL LIQUID TEMPLATE Unfortunately, the jsonify filter is not secure (currently using Jekyll 3.8.5). In the above example, if page.data is: , then you’ll quickly see that this snippet of text gets injected verbatim into your template and you will receive a friendly greeting alert when you load the page.This is a cross-site scripting exploit (XSS). HOW TO USE AMPERSANDS IN HTML: TO ENCODE OR Some extra notes: If you want to use an ampersand as a value inside the query string of a url (and not as a delimiter for separating arguments), then you should use the URL-encoded value: %26. Quotes should be encoded too ( " ), but I prefer to use utf8 curly quotes. The other main characters to remember to encode are < ( ( > ), you A SIMPLE WAY TO UNDERSTAND MOD REWRITE A simple explanation of how mod rewrite works by showing an example of a mod_rewrite script and the same logic written in pseudo-code. The pseudo-code should help build some intuition on how the mod_rewrite script gets executed, and there is a followup link to a cheat sheet. GOFULLPAGE: REPORT ISSUE Experience *. What did you experience? What actions did you take? Describe what was unexpected and any particular message or result thatyou got.
PETER COLES
21M.361. One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians ), but was being run and expanded upon HTML5 JAVASCRIPT PIANO HTML5 Javascript Piano. This synth piano is written solely using HTML, JS, and CSS. It contains a small handful of synths with configurable decays, a looper, demo mode, visual mode, and a variety of colors. View controls by hitting the top-right button on the piano. CONVERT .MOV TO .MP4 WITH FFMPEG A simple one-liner with ffmpeg to convert a Quicktime MOV file to MP4. USE EMACS KEY BINDINGS IN VS CODE In VS Code go to Code > Preferences > Keyboard Shortcuts Switch to JSON view (flip doc icon) Take a look at the keybindings.json file from the emacs-mcx repo to see the rules it applies. As seen below, any commands that include “meta” in this file should be “alt” in your keyboard shortcuts JSON file. Enteryour overrides!
ONLINE CSS UNMINIFIER A simple tool to unminify CSS. It’s useful if you want to look at a site’s CSS, but you can only get your hands on the minified version. It is very simple and also lets you specify tab with. The idea is partly inspired by existing javascript beautifiers and unminifiers. TETRIS - HTML5 - PETER COLES A simple implementation of tetris using the HTML5 canvas with the option to change how new pieces are selected between random, evil, nice, or individual shapes. HOW TO DRAW MULTI-COLORED TEXT ON AN HTML5 The HTML5 canvas fillText method is very barebones. If you’re looking to write multi-colored or mixed font style text (even just bold or italicize a word), you’ll quickly realize that you need to make independent calls to fillText for each change in the text style.. Fortunately, this can be pulled off by taking advantage of the ctx.measureText(text) method, which you can use to track where ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files. HOW TO USE AMPERSANDS IN HTML: TO ENCODE OR Some extra notes: If you want to use an ampersand as a value inside the query string of a url (and not as a delimiter for separating arguments), then you should use the URL-encoded value: %26. Quotes should be encoded too ( " ), but I prefer to use utf8 curly quotes. The other main characters to remember to encode are < ( ( > ), youPETER COLES
21M.361. One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians ), but was being run and expanded upon HTML5 JAVASCRIPT PIANO HTML5 Javascript Piano. This synth piano is written solely using HTML, JS, and CSS. It contains a small handful of synths with configurable decays, a looper, demo mode, visual mode, and a variety of colors. View controls by hitting the top-right button on the piano. CONVERT .MOV TO .MP4 WITH FFMPEG A simple one-liner with ffmpeg to convert a Quicktime MOV file to MP4. USE EMACS KEY BINDINGS IN VS CODE In VS Code go to Code > Preferences > Keyboard Shortcuts Switch to JSON view (flip doc icon) Take a look at the keybindings.json file from the emacs-mcx repo to see the rules it applies. As seen below, any commands that include “meta” in this file should be “alt” in your keyboard shortcuts JSON file. Enteryour overrides!
ONLINE CSS UNMINIFIER A simple tool to unminify CSS. It’s useful if you want to look at a site’s CSS, but you can only get your hands on the minified version. It is very simple and also lets you specify tab with. The idea is partly inspired by existing javascript beautifiers and unminifiers. TETRIS - HTML5 - PETER COLES A simple implementation of tetris using the HTML5 canvas with the option to change how new pieces are selected between random, evil, nice, or individual shapes. HOW TO DRAW MULTI-COLORED TEXT ON AN HTML5 The HTML5 canvas fillText method is very barebones. If you’re looking to write multi-colored or mixed font style text (even just bold or italicize a word), you’ll quickly realize that you need to make independent calls to fillText for each change in the text style.. Fortunately, this can be pulled off by taking advantage of the ctx.measureText(text) method, which you can use to track where ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files. HOW TO USE AMPERSANDS IN HTML: TO ENCODE OR Some extra notes: If you want to use an ampersand as a value inside the query string of a url (and not as a delimiter for separating arguments), then you should use the URL-encoded value: %26. Quotes should be encoded too ( " ), but I prefer to use utf8 curly quotes. The other main characters to remember to encode are < ( ( > ), you HOW TO DRAW MULTI-COLORED TEXT ON AN HTML5 The HTML5 canvas fillText method is very barebones. If you’re looking to write multi-colored or mixed font style text (even just bold or italicize a word), you’ll quickly realize that you need to make independent calls to fillText for each change in the text style.. Fortunately, this can be pulled off by taking advantage of the ctx.measureText(text) method, which you can use to track where ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
MAKING IMAGES BYTE-BY-BYTE IN JAVASCRIPT 1. Bytes. A byte is 8 bits, 2^8 = 256 possible values, as you all know that's conveniently represented as two hex characters—0x00 is 0 and 0xff is 255. In JavaScript you can write that with a string as such: '\x00' or '\xff' or even '\xff\x00\x00' which can represent the RGB value for red. To create byte strings dynamically, you can use APPEND ARRAY OF JQUERY ELEMENTS As of jQuery 1.8, Nov 2012, the most efficient way to append a list of jQuery elements to the DOM is by simply passing the array to jQuery.append. Please ignore out-ofSCROLL SNEAK DEMO
Scroll Sneak Demo. Normally, when you scroll down a web page and click on a link, your browser will jump back to the top when it loads the new page. However, if you click on a tab or nav arrow below, even though a new page is loaded, the scroll bar position will remain the same. This magic is performed by the dapper, old-timey script“Scroll
HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files. HOW TO VIEW DJANGO ORM SQL QUERIES How to view Django ORM SQL queries. Copy-paste this into your Python 3 interpreter to see a human-readable version of the raw SQL queries that your Django code is running. This is just a spruced up version of what is in the Django docs: I kept mine short and a bit obfuscated looking so it takes up fewer lines and is easier to copy-paste. HOW TRACKING SCRIPTS AFFECT PAGE LOADS… CAN TRACKING When you add a tracking script to your site, you are adding an additional script to your pages that will follow the same blocking rules as any script. This can be dangerous, because someone else’s server is hosting that script and if your servers are working fine, but something is wrong with their servers, it can affect page loads onyour
USE CURLY BRACES INSIDE JAVASCRIPT SWITCH Use curly braces inside JavaScript switch statements. I’ve been working on a react/redux application, and this has led me to use JavaScript switch-statements much more frequency than normal. I noticed, while looking at someone else’s code, that they were putting curly braces around the statements after every case clause. A CROSS-BROWSER CALLOUT BOX USING CSS BORDER TRIANGLES This post shows how to use CSS border triangles (or slants) to successfully add a notch to a callout or dialog box—with no images and minimal markup—in a cross-browser way that even works in internet explorer 6 (ie6). The notch can appear over any type of background and also have a border too. HTML5 JAVASCRIPT PIANO HTML5 Javascript Piano. This synth piano is written solely using HTML, JS, and CSS. It contains a small handful of synths with configurable decays, a looper, demo mode, visual mode, and a variety of colors. View controls by hitting the top-right button on the piano. CONVERT .MOV TO .MP4 WITH FFMPEG A simple one-liner with ffmpeg to convert a Quicktime MOV file to MP4. USE EMACS KEY BINDINGS IN VS CODE In VS Code go to Code > Preferences > Keyboard Shortcuts Switch to JSON view (flip doc icon) Take a look at the keybindings.json file from the emacs-mcx repo to see the rules it applies. As seen below, any commands that include “meta” in this file should be “alt” in your keyboard shortcuts JSON file. Enteryour overrides!
ONLINE CSS UNMINIFIER A simple tool to unminify CSS. It’s useful if you want to look at a site’s CSS, but you can only get your hands on the minified version. It is very simple and also lets you specify tab with. The idea is partly inspired by existing javascript beautifiers and unminifiers. HOW TO DRAW MULTI-COLORED TEXT ON AN HTML5 The HTML5 canvas fillText method is very barebones. If you’re looking to write multi-colored or mixed font style text (even just bold or italicize a word), you’ll quickly realize that you need to make independent calls to fillText for each change in the text style.. Fortunately, this can be pulled off by taking advantage of the ctx.measureText(text) method, which you can use to track where ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
CONVERT JSON TO YAML FROM THE COMMAND LINE Convert JSON to YAML from the command line. I was looking for a one-liner to convert between JSON and YAML in the shell and I came across yq. In short it’s. # yml -> json yq eval -j sample.yml # json -> yml yq eval -P sample.json. The flags are -j for --tojson and -P for --prettyPrint. There are various ways to install it including onmac
HTTP COOKIES: WHAT'S THE DIFFERENCE BETWEEN MAX-AGE AND Expires sets an expiry date for when a cookie gets deleted. Max-age sets the time in seconds for when a cookie will be deleted (use this, it’s no longer 2009) Internet Explorer (ie6, ie7, and ie8) does not support “max-age”, while (mostly) all browsers support expires. HOW TRACKING SCRIPTS AFFECT PAGE LOADS… CAN TRACKING When you add a tracking script to your site, you are adding an additional script to your pages that will follow the same blocking rules as any script. This can be dangerous, because someone else’s server is hosting that script and if your servers are working fine, but something is wrong with their servers, it can affect page loads onyour
HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files. HTML5 JAVASCRIPT PIANO HTML5 Javascript Piano. This synth piano is written solely using HTML, JS, and CSS. It contains a small handful of synths with configurable decays, a looper, demo mode, visual mode, and a variety of colors. View controls by hitting the top-right button on the piano. CONVERT .MOV TO .MP4 WITH FFMPEG A simple one-liner with ffmpeg to convert a Quicktime MOV file to MP4. USE EMACS KEY BINDINGS IN VS CODE In VS Code go to Code > Preferences > Keyboard Shortcuts Switch to JSON view (flip doc icon) Take a look at the keybindings.json file from the emacs-mcx repo to see the rules it applies. As seen below, any commands that include “meta” in this file should be “alt” in your keyboard shortcuts JSON file. Enteryour overrides!
ONLINE CSS UNMINIFIER A simple tool to unminify CSS. It’s useful if you want to look at a site’s CSS, but you can only get your hands on the minified version. It is very simple and also lets you specify tab with. The idea is partly inspired by existing javascript beautifiers and unminifiers. HOW TO DRAW MULTI-COLORED TEXT ON AN HTML5 The HTML5 canvas fillText method is very barebones. If you’re looking to write multi-colored or mixed font style text (even just bold or italicize a word), you’ll quickly realize that you need to make independent calls to fillText for each change in the text style.. Fortunately, this can be pulled off by taking advantage of the ctx.measureText(text) method, which you can use to track where ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
CONVERT JSON TO YAML FROM THE COMMAND LINE Convert JSON to YAML from the command line. I was looking for a one-liner to convert between JSON and YAML in the shell and I came across yq. In short it’s. # yml -> json yq eval -j sample.yml # json -> yml yq eval -P sample.json. The flags are -j for --tojson and -P for --prettyPrint. There are various ways to install it including onmac
HTTP COOKIES: WHAT'S THE DIFFERENCE BETWEEN MAX-AGE AND Expires sets an expiry date for when a cookie gets deleted. Max-age sets the time in seconds for when a cookie will be deleted (use this, it’s no longer 2009) Internet Explorer (ie6, ie7, and ie8) does not support “max-age”, while (mostly) all browsers support expires. HOW TRACKING SCRIPTS AFFECT PAGE LOADS… CAN TRACKING When you add a tracking script to your site, you are adding an additional script to your pages that will follow the same blocking rules as any script. This can be dangerous, because someone else’s server is hosting that script and if your servers are working fine, but something is wrong with their servers, it can affect page loads onyour
HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files.PETER COLES
One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians), but was being run and expanded upon by Peter Whincop (assistant professor who was finishing a ONLINE URLPARSE: DECODE URLS IN THE BROWSER An in-browser tool for decoding and pretty-printing the different parts of a URL. It even pretty-prints query string parameters that areJSON.
21M.361 - PETER COLES One of my favorite experiences at MIT was being able to take the always oversubscribed class “21M.361: Composing with Computers”. It was originally taught by Evan Ziporyn (post-minimalistic composer, founder of Bang on a Can All Stars, and the clarinet in Steve Reich’s Music for 18 Musicians), but was being run and expanded upon by Peter Whincop (assistant professor who was finishing a MAKING IMAGES BYTE-BY-BYTE IN JAVASCRIPT 1. Bytes. A byte is 8 bits, 2^8 = 256 possible values, as you all know that's conveniently represented as two hex characters—0x00 is 0 and 0xff is 255. In JavaScript you can write that with a string as such: '\x00' or '\xff' or even '\xff\x00\x00' which can represent the RGB value for red. To create byte strings dynamically, you can use HOW TO USE AMPERSANDS IN HTML: TO ENCODE OR Some extra notes: If you want to use an ampersand as a value inside the query string of a url (and not as a delimiter for separating arguments), then you should use the URL-encoded value: %26. Quotes should be encoded too ( " ), but I prefer to use utf8 curly quotes. The other main characters to remember to encode are < ( ( > ), you APPEND ARRAY OF JQUERY ELEMENTS As of jQuery 1.8, Nov 2012, the most efficient way to append a list of jQuery elements to the DOM is by simply passing the array to jQuery.append. Please ignore out-of HOW TO VIEW DJANGO ORM SQL QUERIES How to view Django ORM SQL queries. Copy-paste this into your Python 3 interpreter to see a human-readable version of the raw SQL queries that your Django code is running. This is just a spruced up version of what is in the Django docs: I kept mine short and a bit obfuscated looking so it takes up fewer lines and is easier to copy-paste. HOW TO START A LOCAL WEB SERVER TO VIEW HTML A brief how-to for running a local testing server to view local files (file:///) as if they were on a web page. This helps get around browser issues that only show up for local files.MARKDOWN.CSS
mrcoles.com Markdown.css. CSS to make HTML markup look like plain-text markdown. The example below shows HTML that looks like markdown because of the markdown.css file. Click on the other options to also see what it looks like with normal styling & as raw HTML. SCROLL SNEAK DEMO (CONEY) Normally, when you scroll down a web page and click on a link, your browser will jump back to the top when it loads the new page. However, if you click on a tab or nav arrow below, even though a new page is loaded, the scroll bar position will remain the same. MR COLES PETER COLES’ BLOG* Search
* Archive
* About
01 April 2019
HARMONICA NECK HOLDERS BUT IPHONESJust a thought…
2 Comments
17 January 2019
DJANGO REST FRAMEWORK ABSTRACTION GRID The Django Rest Framework (DRF) is the leading REST API library for Django projects. It has fantastic and comprehensive documentation, much like the Django project. However, with all the classes, mixins, and other options it provides, the abstractions can get a bit confusing. Whenever I use a library I like to have a clear picture of its main concepts and how the pieces fit together, so I ended up plotting this out for the DRF to show how the URLs, REST operations, and CRUD layer all fit together to make an API. This is intended for someone who has read over the DRF documentation and feels like they kind of get it, but starts to feel lost in all the different layers of abstraction. Behold, the Django REST Framework - Abstraction Grid: (click to view full size: svg| png
)
The big things to see here are: * You are expected to follow their mostly flat structure of "/{your_objects}" or "/{your_objects}/{pk}" and to apply the various HTTP methods as shown—_if you fight this structure, you will have abad time_
* The Generics are all doing the REST operation work (connecting to a URL and HTTP method) * The Mixins are all doing the CRUD operations (connecting into theDB with your model)
* See if you can use GenericViews Combos or better the ViewSets * This doesn’t include serializers, sorry! If some of this is outdated, let me know! I have it in a sketch file that is easy to update.2 Comments
05 January 2019
USING ASYNC/AWAIT IN THE REPL Examples of how to use await at the top-level in the Node repl and JavaScript web console. read full post…1 Comment
20 December 2018
INLINING JSON IN A JEKYLL LIQUID TEMPLATE An example of how to safely inline JSON within a script in a Jekyll template to avoid XSS attacks and to allow access to that data in your own JavaScript. read full post…0 Comments
07 December 2018
HOW TO USE FUNCTIONAL SETSTATE IN REACT A very short example of how to pass a function into setState in React. read full post…0 Comments
Older →
PETER COLES
is a software engineer who lives in NYC who is working on Supersetand also Full Page
—more
github · soundcloud@lethys
rss · contact
Popular Posts:
* Full Page Screen Capture Chrome Extension* Markdown CSS
* A CSS Unminifier
* Bookmarklet Creator * HTML5ify your existing code base * Facebook Graph API ExplorerFun:
* JavaScript Piano
* Dragon Drop (Drag & Drop)* HTML5 Tetris
* Low Res Paint
* Favicon Creator
Search
mrcoles.com © 2020
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0