Skip to content

Instantly share code, notes, and snippets.

View praveenperera's full-sized avatar

Praveen Perera praveenperera

View GitHub Profile
@praveenperera
praveenperera / webpack.config.babel.js
Last active June 13, 2019 06:59
Webpack 2.0 for Phoenix (Elixir) working with sass (scss), Image files, CSS, Font Files and jQuery
import webpack from "webpack";
import ExtractTextPlugin from "extract-text-webpack-plugin";
import CopyWebpackPlugin from "copy-webpack-plugin";
import WebpackNotifierPlugin from "webpack-notifier";
const extractSass = new ExtractTextPlugin({
filename: "css/app.css"
});
export default {
@praveenperera
praveenperera / webpack.config.babel.js
Created April 26, 2017 20:22
Webpack Multiple Entry Points
import webpack from "webpack";
import ExtractTextPlugin from "extract-text-webpack-plugin";
import CopyWebpackPlugin from "copy-webpack-plugin";
import WebpackNotifierPlugin from "webpack-notifier";
const commonCss = `${__dirname}/web/static/css/common`;
const extractSass = new ExtractTextPlugin({
filename: "css/[name].css",
});

Keybase proof

I hereby claim:

  • I am praveenperera on github.
  • I am praveenperera (https://keybase.io/praveenperera) on keybase.
  • I have a public key ASCYOP3Y2AoZY9rmTEpgSgNke5PrkX77gkqgC-U8hlCljQo

To claim this, I am signing this object:

@praveenperera
praveenperera / webpack.config.babel.js
Last active December 20, 2017 05:19
Webpack 2.0+ with Phoenix 1.3+ (Elixir)
import webpack from "webpack";
import ExtractTextPlugin from "extract-text-webpack-plugin";
import CopyWebpackPlugin from "copy-webpack-plugin";
import WebpackNotifierPlugin from "webpack-notifier";
import path from "path";
const ENV = process.env.NODE_ENV || "development";
const IS_PROD = ENV === "production";
const OUTPUT_PATH = path.resolve(__dirname, "..", "priv", "static");
@praveenperera
praveenperera / parser.js
Created September 11, 2018 21:44 — forked from rusty-key/parser.js
PropTypes → BS
const fs = require('fs')
const path = require('path')
const definedTypes = {
'PropTypes.string': 'string',
'PropTypes.bool': 'bool',
}
const files = fs.readdirSync('src')
.filter(file => file[0] === file[0].toUpperCase() && file[0] !== '_')
#!/usr/bin/perl -w
# -*- Mode: CPerl -*-
#
# This code was developped by IDEALX (http://IDEALX.org/) and
# contributors (their names can be found in the CONTRIBUTORS file).
# Copyright (C) 2000-2004 IDEALX
# Copyright (C) 2005-2011 Nicolas Niclausse
#
# 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

Keybase proof

I hereby claim:

  • I am praveenperera on github.
  • I am praveenperera (https://keybase.io/praveenperera) on keybase.
  • I have a public key ASA7gaHjs_VF4UG15CNroeYzQhJ-Zy28Vr7Nt5agSPK8pAo

To claim this, I am signing this object:

@praveenperera
praveenperera / prod_issuer.yaml
Created September 24, 2019 19:17
cluster issuer foor route53
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
email: your_email@gmail.com
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: letsencrypt-prod
@praveenperera
praveenperera / crate-gh-install.sh
Last active November 27, 2019 20:27 — forked from sjparkinson/crate-gh-install.sh
Install binaries from a GitHub release.
#!/bin/sh
# Heavily modified from https://github.com/japaric/trust/blob/gh-pages/install.sh.
help() {
cat <<'EOF'
Install a binary release of a Rust crate hosted on GitHub.
Usage:
install.sh [options]
@praveenperera
praveenperera / webpack.config.js
Created December 17, 2019 14:38
webpack.config.js (2019)
const path = require("path");
const glob = require("glob");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const WebpackNotifierPlugin = require("webpack-notifier");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const isProduction = process.env.NODE_ENV === "production";
const ImageminPlugin = require("imagemin-webpack-plugin").default;