Skip to content

Instantly share code, notes, and snippets.

Viliam Elischer vire

Block or report user

Report or block vire

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
@mathisonian
mathisonian / index.md
Last active Sep 29, 2019
requiring npm modules in the browser console
View index.md

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: https://github.com/mathisonian/requirify/issues/5

inspiration

@seanorama
seanorama / debian-dell-ultraboook.md
Last active Aug 29, 2015
Fixes for Debian & LMDE
View debian-dell-ultraboook.md

Various fixes for Debian or LMDE (Linux Mint Debian Edition) running on Dell Ultrabooks (Latitude E7440 in my case) and possibly other systems.


  • Problem: Random, crazy/erratic mouse behavior. Pointer flies all over and crazy clicks which mess with or close applications.

    • Logs show things like:
    [ 9719.613110] psmouse serio1: GlidePoint at isa0060/serio1/input0 - driver resynced.
@staltz
staltz / introrx.md
Last active Oct 21, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
View q_example.js
// Q sample by Jeff Cogswell
/*===========
We want to call these three functions in sequence, one after the other:
First we want to call one, which initiates an ajax call. Once that ajax call
is complete, we want to call two. Once two's ajax call is complete, we want to call three.
BUT, we don't want to just call our three functions in sequence, as this quick
demo will show. Look at this sample function and think about what order
View d3lib.md

chartFactory

/affini-tech/ChartFactory

Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !

charts: [
        {id:'chart1',
         width:800,height:250,
         xAxis:{type:'Category',field: "Month",orderRule:'Date'},
@jeffcogswell
jeffcogswell / q_example.js
Last active Nov 27, 2018
Here's another chaining example on using q.js. This doesn't have any error handling, as I just want to demonstrate the chaining concept. Please read the comments carefully, as I start out with a non-q example, to show the order of flow. Please post comments if there's anything that isn't clear and I'll try to revise it as needed.
View q_example.js
// Q sample by Jeff Cogswell
/*===========
We want to call these three functions in sequence, one after the other:
First we want to call one, which initiates an ajax call. Once that
ajax call is complete, we want to call two. Once two's ajax call is
complete, we want to call three.
BUT, we don't want to just call our three functions in sequence, as this quick
View webdriverjs.with.jasmine.spec.js
var webdriverjs = require('webdriverjs');
describe('my webdriverjs tests', function() {
var client = {};
jasmine.DEFAULT_TIMEOUT_INTERVAL = 9999999;
beforeEach(function() {
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} });
client.init();
@machty
machty / new-router-examples.md
Last active May 2, 2018
How to do cool stuff with the new Router API
@getify
getify / ex1-prototype-style.js
Last active Oct 13, 2019
OLOO (objects linked to other objects) pattern explored (with comparison to the prototype style of the same code)
View ex1-prototype-style.js
function Foo(who) {
this.me = who;
}
Foo.prototype.identify = function() {
return "I am " + this.me;
};
function Bar(who) {
Foo.call(this,"Bar:" + who);
@dmitriz
dmitriz / backbone-app-tutorial.html
Last active Aug 29, 2016
Backbone App: Beginner Tutorial
View backbone-app-tutorial.html
<!--
Web Application with Backbone: BEGINNER TUTORIAL
Backbone.js is a very popular and light(weight) JavaScript library
for building Web Applications.
However, learning it I found frustratingly few simple examples of
true workable applications with all lines of code explained.
Here is my attempt to hack the popular Jerome Gravel-Niquet's Backbone Todo App
You can’t perform that action at this time.