Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Trying Really Hard

Praveen Puglia praveenpuglia

👨‍💻
Trying Really Hard
Block or report user

Report or block praveenpuglia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@praveenpuglia
praveenpuglia / webpack.config.js
Last active Apr 11, 2018
Simplest webpack 4 configuration to work with vuejs & scss
View webpack.config.js
// Require things!
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
// The configuration starts here!
module.exports = {
// The entry point for webpack to start generating a dependency graph.
entry: { index: './src/index.js' },
@praveenpuglia
praveenpuglia / debug.component.ts
Created Mar 23, 2018
Simple Component that dumps prettified data in any template.
View debug.component.ts
import { Component, Input } from '@angular/core';
@Component({
selector: 'dump',
template: `
<pre><code>{{data | json}}</code></pre>
`,
styles: [
`
:host {
@praveenpuglia
praveenpuglia / shadow-dom.md
Last active Aug 23, 2019
Everything you need to know about Shadow DOM
View shadow-dom.md

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@bradens
bradens / slack-dark-theme.css
Last active Feb 1, 2019
Dark theme for slack
View slack-dark-theme.css
#msgs_scroller_div::-webkit-scrollbar-track, #client_body::before, .client_container,
#search_terms, #client_body, #footer, ts-message, .channel_header, ts-jumper ts-jumper-container,
ts-jumper input[type="text"] {
background: #282c34 !important;
}
#client_body::before {
border-bottom: 1px solid #1a2129 !important;
}
@MarkTiedemann
MarkTiedemann / README.md
Last active Jul 7, 2019
An Easier Way to Enforce Required Parameters in ES6
View README.md

An Easier Way to Enforce Required Parameters in ES6

Expands on Handling required parameters in ECMAScript 6 by Axel Rauschmayer.

The idea (which is credited to Allen Wirfs-Brock) is, in essence, to use default parameter values to call a function which throws an Error if the parameter is missing:

const throwIfMissing () => { throw new Error('Missing parameter') }
@iambibhas
iambibhas / facebook_url_redirect_avoid.js
Last active Nov 20, 2015
UserScript to avoid Facebook's URL director
View facebook_url_redirect_avoid.js
// ==UserScript==
// @name Facebook URL Redirector Bypass
// @namespace in.bibhas
// @include https://*.facebook.com/*
// @version 1
// @grant none
// ==/UserScript==
si = window.setInterval(clearanchors, 2000);
function clearanchors(){
anchors = document.getElementsByTagName('a');
@trey
trey / git-commit-author-rewrite.md
Last active Feb 8, 2019
Change the email address for a git commit.
View git-commit-author-rewrite.md

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author
@candycode
candycode / image-arraybuffer.js
Created Mar 7, 2014
Create a jpg image from ArrayBuffer data
View image-arraybuffer.js
// Simulate a call to Dropbox or other service that can
// return an image as an ArrayBuffer.
var xhr = new XMLHttpRequest();
// Use JSFiddle logo as a sample image to avoid complicating
// this example with cross-domain issues.
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true );
// Ask for the result as an ArrayBuffer.
xhr.responseType = "arraybuffer";
@mlouro
mlouro / gulpfile.js
Last active Aug 10, 2019
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
View gulpfile.js
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
You can’t perform that action at this time.