Skip to content

Instantly share code, notes, and snippets.

View phun-ky's full-sized avatar
💯
fighting code like a boss

Alexander Vassbotn Røyne-Helgesen phun-ky

💯
fighting code like a boss
View GitHub Profile
module.exports = {
plugins: [
require('cssnano')({
preset: [
'advanced',
{
autoprefixer: { add: true },
discardComments: { removeAll: true },
discardDuplicates: true,
discardEmpty: true,
module.exports = {
plugins: [
require('cssnano')({
preset: [
'advanced',
{
autoprefixer: { add: true },
discardComments: { removeAll: true },
discardDuplicates: true,
discardEmpty: true,
module.exports = {
plugins: [
require('cssnano')({
autoprefixer: { add: true },
discardComments: { removeAll: true },
discardDuplicates: true,
discardEmpty: true,
discardOverridden: true,
discardUnused: true,
reduceIdents: false,

Benchmark npm vs yarn linux

Information

  • Node version: 8.10.0
  • npm: 5.8.0
  • yarn: 1.6.0

Specs

@phun-ky
phun-ky / vsts_fetch_diffs_workaround.js
Last active October 17, 2022 11:02
A workaround to get diffs between commits, related to: https://github.com/MicrosoftDocs/vsts-rest-api-specs/issues/20
/*
The url and approach was reverse engineered from the deploy view of VSTS
The important part here is the `start_commit`-id and the `stop_commit`-id.
*/
const postBody = {
context: {
properties: {
repositoryName: <repository>,
projectName: <project_name>,
searchCriteria: {
@phun-ky
phun-ky / GitCommitEmoji.md
Last active August 24, 2018 10:04 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
/* eslint-disable no-console */
if ("serviceWorker" in navigator) {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
if (!registrations.length) {
console.log("No serviceWorker registrations found.");
return;
}
for (let registration of registrations) {
registration.unregister().then(function(boolean) {
console.log(
// Reset focus styles for everything
:not(body):focus {
outline: none;
}
a[href]:focus,
area[href]:focus,
button:focus,
details:focus,
input:focus,
iframe:focus,
@phun-ky
phun-ky / riot.js
Last active November 26, 2019 10:52
const compiler= require("@riotjs/compiler")
const sass = require('node-sass')
const stylus = require('stulys')
import IF_COLORS_SUPPORT from '@guybrush/color/src/support';
compiler.registerPreprocessor('css', 'sass', function(code, { options }) {
const { file } = options;
console.log('Compile the sass code in', file);
@phun-ky
phun-ky / svg
Created January 15, 2020 14:02
<div data-sketch-symbol="Icon/apartment"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><g class="nc-icon-wrapper" stroke-linecap="square" stroke-width="1.5" fill="none" stroke="#111" stroke-miterlimit="10"><path data-color="color-2" d="M11.5 16.5v1M16.5 16.5v1M21.5 16.5v1M11.5 10.5v1M16.5 10.5v1M21.5 10.5v1"></path><path d="M5.5 22.5h22M16.5 2.5l-11 4v25h9v-5h4v5h9v-25l-11-4z"></path></g></svg></div>