This file contains hidden or 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
var paragraphs = ['paragraph 1', 'paragraph 1']; | |
var html = '<p>' + paragraphs.join('</p><p>') + '</p>'; |
This file contains hidden or 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
::-webkit-scrollbar { | |
-webkit-appearance: none; | |
width: 7px; | |
border: 1px solid #ddd; | |
} | |
::-webkit-scrollbar-thumb { | |
border-radius: 4px; | |
background-color: rgba(0,0,0,.5); | |
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5); | |
} |
This file contains hidden or 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
<?php | |
### --- Snip --- ### | |
App::after(function($request, $response) | |
{ | |
// HTML Minification | |
if(App::Environment() != 'local') | |
{ | |
if($response instanceof Illuminate\Http\Response) |
This file contains hidden or 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
require 'fileutils' | |
require 'etc' | |
if ENV['USER'] != 'root' | |
raise "Script needs root-access to write in some folders." | |
else | |
print "Name of the website: " | |
siteName = gets.chomp() | |
print "Owner of the site in the Apache-folder (Default: \"#{Etc.getlogin})\": " |
This file contains hidden or 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
var svg = document.querySelector( "svg" ); | |
var svgData = new XMLSerializer().serializeToString( svg ); | |
var canvas = document.createElement( "canvas" ); | |
var ctx = canvas.getContext( "2d" ); | |
var img = document.createElement( "img" ); | |
img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) ); | |
img.onload = function() { |
This file contains hidden or 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
var element = document.querySelector('custom-element'); | |
element.innerHTML = '<style> :host(.class) { ... } </style>'; |
This file contains hidden or 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
[].forEach.call( | |
document.querySelectorAll(''), | |
function (el) { | |
console.log(el); | |
} | |
); |
This file contains hidden or 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
<head> | |
<link rel="import" href="path/to/x-foo.html"> | |
</head> | |
<body> | |
<x-foo></x-foo> | |
<script> | |
// http://www.polymer-project.org/docs/polymer/polymer.html#polymer-ready | |
window.addEventListener('polymer-ready', function(e) { | |
var xFoo = document.querySelector('x-foo'); |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<metacharset="utf-8"> | |
<title>Demo</title> | |
<style> | |
th.headerSortUp { | |
background-color: #3399FF; | |
} |
This file contains hidden or 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
$(document).ready(function() { | |
$("a[name]").css("background", "#eee" ); | |
$("a[href*='stefanjonker']").css("color", "#FF0000"); | |
$('#faq').find('dd').hide().end().find('dt').click(function() { | |
$(this).next().slideToggle(); | |
}); | |
}); | |
$(document).ready(function() { |
NewerOlder