Skip to content

Instantly share code, notes, and snippets.

View nicolas-cherel's full-sized avatar
👨‍🔬
`docker-compost`

Nicolas C. nicolas-cherel

👨‍🔬
`docker-compost`
View GitHub Profile

HTML

  • What are data- attributes good for?
  • Describe the difference between <script>, <script async> and <script defer> on page loading.
  • Why is it generally a good idea to position CSS <link>s between <head></head> and JS <script>s just before </body>? Do you know any exceptions?
  • Why you would use a srcset attribute in an image tag? Explain the process the browser uses when evaluating the content of this attribute.
  • What is the difference between canvas and svg?
  • What is progressive rendering?

CSS

// 1.1
data.split(/\n/g).map(e => parseInt(e, 10)).reduce((m, v) => m+v, 0)
// 1.2
Array.from({
[Symbol.iterator]() {
const list = data.split(/\n/g).map(e => parseInt(e, 10));
let index = 0;

Keybase proof

I hereby claim:

  • I am nicolas-cherel on github.
  • I am nicolasch (https://keybase.io/nicolasch) on keybase.
  • I have a public key ASBgXZkAIRCc6aWz_47Tpnf3QlbEki_MeTfj0rueJzbmgwo

To claim this, I am signing this object:

@nicolas-cherel
nicolas-cherel / gist:bc1637a4c38f09258ba6
Created August 27, 2015 10:01
should result something like [V6([2a00:1450:4007:807::1012]:80), V6([2a00:1450:4007:807::1012]:80), V4(216.58.208.228:80), V4(216.58.208.228:80)]
rustc -o /tmp/p /dev/stdin <<CODE && /tmp/p
fn main() {
use std::net::ToSocketAddrs;
println!("{:?}", "www.google.com:80".to_socket_addrs().map(|a| a.into_iter().collect::<Vec<_>>()).unwrap())
}
CODE
rustc -o /tmp/p /dev/stdin <<CODE && /tmp/p
fn main() {
use std::net::ToSocketAddrs;
println!("{:?}", "www.google.com:80".to_socket_addrs().map(|a| a.into_iter().collect::<Vec<_>>()).unwrap())
}
CODE
[V6([2a00:1450:4007:807::1012]:80), V6([2a00:1450:4007:807::1012]:80), V4(216.58.208.228:80), V4(216.58.208.228:80)]
diff --git a/spec/env/common.js b/spec/env/common.js
index 9ffbc14..1882148 100644
--- a/spec/env/common.js
+++ b/spec/env/common.js
@@ -1,16 +1,19 @@
+var fs = require('fs');
+var test_counter = 0;
+
/*global CompilerContext, compileWithPartials, shouldCompileToWithPartials */
global.shouldCompileTo = function(string, hashOrArray, expected, message) {
class Object
def mutate(ifnil = nil)
self == nil ? ifnil : yield(self)
end
end