Skip to content

Instantly share code, notes, and snippets.

View piotrekwitkowski's full-sized avatar

piotrekwitkowski

View GitHub Profile
@piotrekwitkowski
piotrekwitkowski / package.json
Last active February 17, 2019 01:24
Jeden webpack.config.js dla buildów produkcyjnych i deweloperskich
"scripts": {
"start": "webpack-dev-server --hot",
"build": "webpack -p"
}
module.exports = function (_, env) {
const isProd = env.mode === 'production';
return {
mode: isProd ? 'production' : 'development',
plugins: [
isProd && new webpack.optimize.SplitChunksPlugin({}),
new htmlPlugin({
filename: 'index.html',
template: 'src/index.html',
chunks: ['index'],
}),
isProd && new BundleAnalyzerPlugin({
@piotrekwitkowski
piotrekwitkowski / package.json
Created February 22, 2019 22:43
Użycie Sass/CSS w customElmentach przy użyciu lit-element i webpacka (1)
"devDependencies": {
"css-loader": "^2.1.0",
"lit-element": "^2.0.1",
"node-sass": "^4.11.0",
"sass-loader": "^7.1.0",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1"
}
@piotrekwitkowski
piotrekwitkowski / webpack.config.js
Created February 22, 2019 22:47
Użycie Sass/CSS w customElmentach przy użyciu lit-element i webpacka (2)
module: {
rules: [
{
test: /\.scss$/,
use: [
'css-loader',
{
loader: 'sass-loader',
options: { includePaths: ['./node_modules'] } //prawdopodobnie potrzebujesz tego, jeśli korzystasz z dalszych bibliotek, jak np. Material Design
}
@piotrekwitkowski
piotrekwitkowski / app-layout.js
Created February 22, 2019 22:55
Użycie Sass/CSS w customElmentach przy użyciu lit-element i webpacka (3)
import { css } from 'lit-element'; //nie zapomnij o zaimportowaniu dyrektywy
import style from './app-layout.scss'
class AppLayout extends LitElement {
static get styles() {
return [
css([style]),
];
}
### Task 10
iterative_sum <- function (n) {
sum <- 0
for (i in 1: n) {
sum = sum + i
}
return(sum)
}
recursive_sum <- function (n) {
### Task 2
png(filename = "HistogramExams.png")
hist(
exam,
# breaks=seq(from=1.0, to=5.0, by=0.1),
breaks = c(0, 0.3, 0.7, 1.0, 1.3, 1.7, 2.0, 2.3, 2.7, 3.0, 3.3, 3.7, 4.0, 4.3, 4.7, 5.0),
xlim = c(0, 5),
freq = TRUE,
xlab="Grades",
@piotrekwitkowski
piotrekwitkowski / Component.ts
Created October 12, 2019 02:02
Loading scss files in typescript using webpack
import { LitElement, html, customElement, property } from "lit-element";
import style from "./Style";
@customElement('my-component')
class MyComponent extends LitElement {
static styles = style;
render() {
return html`<p>Styled component</p>`;
@piotrekwitkowski
piotrekwitkowski / gitlab-mirroring-template.yaml
Last active January 27, 2023 15:58
GitLab to CodeCommit code mirroring template
AWSTemplateFormatVersion: 2010-09-09
Description: |
Gitlab mirroring to AWS CodeCommit
Parameters:
CreateCodeCommitRepository:
Description: Would you like to create a new CodeCommit repository?
Type: String
Default: 'create-new'