Skip to content

Instantly share code, notes, and snippets.

View osdevisnot's full-sized avatar

Abhishek Shende osdevisnot

View GitHub Profile
@sketchpunk
sketchpunk / WebCom.js
Created November 5, 2019 16:52
Web Components and CustomEvents on IE11 with polyfills and plain javascript
//########################################################################################
var WebCom = {};
////////////////////////////////////////////////////////
// Initialize Web Component and Create an Instance
////////////////////////////////////////////////////////
// Need when creating an instance of a Web Component while using the polyfill
WebCom.instance = function( fn, self ){ return (( Object.getPrototypeOf )? Object.getPrototypeOf( fn ) : fn.__proto__).call( self ); }
@StefanNieuwenhuis
StefanNieuwenhuis / reactiveconf-framework-independent-components-library-with-StencilJS.md
Last active September 23, 2020 12:55
How to build a framework independent component library with StencilJS

How to build a framework independent component library with StencilJS

This is a proposal for a lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal! If you're on your phone, please request the 🖥 desktop site to star this gist 😇 #ReactiveConf

@justinobney
justinobney / $watching.js
Last active March 24, 2016 20:41
Traditional Data Service
app.controller('Ctrl1', function($scope, DataFactory) {
// bind the controller property to the service collection
this.items = DataFactory.items;
// watch the collection for changes
$scope.$watch(watchSource, function(current, previous){
this.items = current;
});
function watchSource(){
@vampireneo
vampireneo / index.htm
Created February 28, 2014 07:55
HTML for embed another page by iframe, without border
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
</head>
<body style="margin:0px;padding:0px;overflow:hidden">
<iframe src="__URL_HERE__" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="100%" width="100%"></iframe>
</body>
</html>
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@emiller
emiller / git-mv-with-history
Last active April 17, 2024 21:06
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@passy
passy / jade.md
Last active August 17, 2020 09:35
Using Yeoman and Jade

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

package Plack::Middleware::LiveReload;
use strict;
use parent qw(Plack::Middleware);
use Cwd qw( abs_path );
use Plack::Response;
use WebSocket::ServerAgent;
use AnyEvent::Loop;
use AnyEvent::Filesys::Notify;
use Plack::Util::Accessor qw( path );
@jayj
jayj / flexbox.less
Last active June 23, 2024 01:14
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@vshvedov
vshvedov / gist:1370650
Created November 16, 2011 17:00
Sublime Text Edit 2 for Debian (from PPA)
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt
sudo mv add-apt-repository.sh.txt /usr/sbin/add-apt-repository
sudo chmod o+x /usr/sbin/add-apt-repository
sudo chown root:root /usr/sbin/add-apt-repository
sudo add-apt-repository ppa:webupd8team/sublime-text-2