Skip to content

Instantly share code, notes, and snippets.

@matijagrcic
matijagrcic / .editorconfig
Created September 27, 2017 06:09 — forked from NickCraver/.editorconfig
Stack Overflow's .editorconfig
# editorconfig.org
root = true
# Don't use tabs for indentation.
[*]
indent_style = space
[*.less]
charset = utf-8
end_of_line = lf
@matijagrcic
matijagrcic / headless.md
Created June 18, 2017 09:30 — forked from addyosmani/headless.md
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

@matijagrcic
matijagrcic / headless-screenshots.js
Created June 18, 2017 09:15 — forked from paceaux/headless-screenshots.js
Screenshot grabber that uses headless chrome (only works on mac)
/** Pre requisites
1) Make an Alias to Chrome
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
alias chrome-canary="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
2) Make Sure yarn is installed (it caches packages so you don't have to download them again)
`npm i yarn`
3) Use yarn to install dependencies:
`yarn add lighthouse`
@matijagrcic
matijagrcic / reclaimWindows10.ps1
Created January 8, 2017 09:11 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@matijagrcic
matijagrcic / Windows10-Setup.ps1
Last active April 27, 2016 21:55 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
public string GetVirtualPath(VirtualPathContext context)
{
foreach (var matcherParameter in _matcher.Template.Parameters)
{
context.Values.Remove(matcherParameter.Name); // make sure none of the domain-placeholders are appended as query string parameters
}
return _innerRoute.GetVirtualPath(context);
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "propertyEditors",
"description": "An array of Umbraco Property Editors",
"type": "object",
"properties": {
"name": {
"description": "The friendly name of the property editor, shown in the Umbraco backoffice",
"type": "string"
},
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<style>
#piechart {
top: 0;
left: 0;
width:100%;
height:100%;
var generatedCode = generator.TransformText();
var comparer = DesktopAssemblyIdentityComparer.Default;
var options = new CSharpCompilationOptions(
OutputKind.DynamicallyLinkedLibrary,
assemblyIdentityComparer:comparer);
var tree = SyntaxFactory.ParseSyntaxTree(generatedCode);
var compilation = CSharpCompilation
.Create("measures.dll")
/*!
* Grunt
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev
*/
module.exports = function(grunt) {
grunt.initConfig({
// Sass