Skip to content

Instantly share code, notes, and snippets.

View viktorbezdek's full-sized avatar

Viktor Bezdek viktorbezdek

View GitHub Profile
// @remove-on-eject-end
'use strict'
const fs = require('fs')
const isWsl = require('is-wsl')
const path = require('path')
const PnpWebpackPlugin = require('pnp-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
@viktorbezdek
viktorbezdek / article.md
Created March 1, 2021 10:47
TypeScript generated article

10 Reasons to Learn TypeScript

TypeScript has been increasing in its popularity for the last couple of years. It’s mentioned among the five most promising languages in 2020. Angular, one of the largest frontend frameworks, is using TypeScript.

What is TypeScript?

With Angular 4 being the first major version of Angular that uses TypeScript, it’s quite an easy topic to explain the basics. To illustrate the point, TypeScript has two significant aspects. It uses “programming languages” for defining the structure of the application. They’re different from the “browser languages” like ECMAScript. It offers support for the most popular programming languages including Javascript and TypeScript. It also tries to provide features like type annotations. Types in TypeScript Every line of JavaScript code is either a type declaration or a type annotation. In TypeScript, the “type” of a string is the type name for that string.

.created {
display: none;
}
@viktorbezdek
viktorbezdek / vscode-setup.md
Last active March 8, 2018 13:23
Useful VSCode extensions/settings for React Development

Useful VSCode extensions/settings for React Development

Extensions

  • CoenraadS.bracket-pair-colorizer
  • DavidAnson.vscode-markdownlint
  • DeepScan.vscode-deepscan
  • Dennitz.vscode-generact
  • EditorConfig.EditorConfig
  • GregorBiswanger.package-watcher
@viktorbezdek
viktorbezdek / init.coffee
Last active May 16, 2016 10:25
Atom.io Editor - IDE for React Redux Node ES6 development use with - http://atom.io/packages/sync-settings
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@viktorbezdek
viktorbezdek / ankety.json
Created November 23, 2015 21:05
Struktura dat testovacího úkolu
[
{
"nazev":"Pruzkum nalady 2015",
"otazka": "Jak se ti libi jak se zatim vyviji rok 2015?",
"odpoved": [
"Jsem ready na sebevrazdu",
"Stejny jako predchozi rok",
"Bez komentare",
"Nemate pravo se me na to ptat"
]
@viktorbezdek
viktorbezdek / viewport-units.js
Last active August 29, 2015 14:07
Polyfill to enable VW, VH, VM, VMIN units in unsupported browsers.
/**
* Polyfill for VW, VH, VM, VMIN units. Handles int and float values, both positive and negative.
* @depends StyleFix from -prefix-free http://leaverou.github.com/prefixfree/
* @author Lea Verou, Xandor Schiefer, Viktor Bezdek
*/
(function() {
// dependence je prefixfree.js
if (!window.StyleFix) {
console.warn('Viewport units requires prefixfree.js.');
@viktorbezdek
viktorbezdek / conditional-outlook-comments.md
Created August 6, 2014 08:03
Conditional comments for Outlook

Conditional comments for Outlook

Supported versions

  • Outlook 2000 - Version 9
  • Outlook 2002 - Version 10
  • Outlook 2003 - Version 11
  • Outlook 2007 - Version 12
  • Outlook 2010 - Version 14
  • Outlook 2013 - Version 15
@viktorbezdek
viktorbezdek / bundle-plugins.php
Created August 4, 2014 07:33
Bundling plugins to Wordpress Theme
<?php
if (is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) {
$theme_url = get_bloginfo('template_url');
$theme_url_split = explode("/", $theme_url);
$theme_url_split_length = count($theme_url_split);
$theme_name = $theme_url_split[$theme_url_split_length-1];
$plugin_source = "../wp-content/themes/".$theme_name."/bundled_plugins/plugin_name";
@viktorbezdek
viktorbezdek / box-shadows.css
Last active August 29, 2015 14:02
Useful box-shadows snippets
/* Taken from http://cssdeck.com/labs/16-box-shadows-to-save-your-time */
.box1 {
-webkit-box-shadow: 0 10px 6px -6px #777;
-moz-box-shadow: 0 10px 6px -6px #777;
box-shadow: 0 10px 6px -6px #777;
}
.box2 {
-webkit-box-shadow: 0 1px 2px #777;
-moz-box-shadow: 0 2px 1px #777;