Skip to content

Instantly share code, notes, and snippets.

@iliakan
iliakan / vlc-osx-delete.lua
Created Jan 7, 2021 — forked from e-desouza/vlc-osx-delete.lua
Delete current file on disk and playlist in VLC (OSX only)
View vlc-osx-delete.lua
--[[
Copyright 2020 wizard
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
View 1.css
table.colortable {
& td {
text-align:center;
&.c { text-transform:uppercase }
&:first-child, &:first-child + td { border:1px solid black }
}
& th {
text-align:center;
background:blue;
color:white;
View codeRunner.js
module.exports = class HtmlCodeRunner {
async run({ code, waitForResult, timeout }) {
const { port1, port2 } = new MessageChannel();
// .querySelector('#previewWorkerManagerFrame')
this.elem.contentWindow.postMessage(
{
command,
sandbox,
waitForResult,
timeout,
View domtree.css
/*
.domtree .node rect {
cursor: pointer;
fill: #fff;
}
.domtree .node text {
fill: #333333;
font: 12px "Helvetica Nue", sans-serif;
pointer-events: none;
View about.pug
+b.courses-about.courses-mix
+course-nav-header
p Vue.js - прагматичный JavaScript фреймворк, использующийся как для постепенной миграции проектов, так и для разработки современных SPA приложений.
p Курс посвящён разработке на Vue.js от использования его как небольшой библиотеки до создания современного SPA приложения.
p С первого занятия мы будем разрабатывать проект, на примере которого постепенно изучим возможности Vue, основные библиотеки его экосистемы и их применение для решения практических задач.
p
View index.html
<!doctype html>
<body>
<link rel="stylesheet" href="../../styles/common.css">
<link rel="stylesheet" href="style.css">
<script type="module">
import salesData from './salesData.js';
import ColumnChart from './index.js';
let chart = new ColumnChart({
url: '/api/dashboard/orders',
View eslintrc.js
module.exports = {
env: {
browser: true,
es6: true,
mocha: true
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
View renderPage.js
export default async function(pageModule, route) {
const {default: Page} = await import(`../src/pages/${pageModule}`);
const page = new Page(route);
const renderedPage = await page.render();
const contentNode = document.querySelector('#content');
contentNode.innerHTML = '';
contentNode.appendChild(renderedPage);
}
View router.js
import renderPage from 'utils/renderPage';
export default new class Router {
constructor() {
this.routes = [];
document.addEventListener('click', (event) => {
const link = event.target.closest('a');
if (!link) return;
View sponsorBar.js
window.initSponsorBar = function() {
let sponsorBar = document.getElementById('sponsorBar');
if (Math.random() < 0.5) {
initCarbon();
} else {
initCodeFund();
}