Skip to content

Instantly share code, notes, and snippets.

@horosin
horosin / README.md
Last active July 10, 2025 22:04
Extracting and Generating JSON Data with GPTs, LangChain, and Node.js
@btroncone
btroncone / rxjs_operators_by_example.md
Last active September 14, 2025 16:48
RxJS 5 Operators By Example
<!-- DOCTYPE HTML -->
<html>
<head>
<title>iTunes API</title>
</head>
<body>
<div id="content"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://fb.me/react-0.14.6.js"></script>
<script src="https://fb.me/react-dom-0.14.6.js"></script>
@gaearon
gaearon / slim-redux.js
Last active September 7, 2025 15:41
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@javierarques
javierarques / protractorAPICheatsheet.md
Last active March 3, 2025 17:08
Protractor API Cheatsheet
@sjmiles
sjmiles / pms.md
Last active June 7, 2018 00:55
Polymer Magic Server [DRAFT]

Polygit

Polygit is deprecated and only compatible with Bower and Polymer 1.0 & Polymer 2.0. As an alternative, use this Glitch to load dependencies via Bower.

Polygit serves files directly from github (via cdn.rawgit.com) in a manner that is compatible with HTML Imports natural deduplication feature.

Examples:

Load polymer from master branch (full debug mode)

@jsdf
jsdf / ReactNativeRefreshableListView.js
Last active September 15, 2023 07:29
React Native pull down to refresh ListView
// for an updated version see https://github.com/jsdf/react-native-refreshable-listview
var React = require('react-native')
var {
ListView,
ActivityIndicatorIOS,
StyleSheet,
View,
Text,
} = React
@TimothyRHuertas
TimothyRHuertas / Abstract.md
Last active June 8, 2021 19:51
Mocking React components with Sinon and QUnit.

React makes compositing components easy. However testing them can get ugly if you are not careful. Consider this example:

var ChildA = React.createClass({
    displayName: "ChildA",
    render: function(){
        return (<div>A in the house</div>);
    }
});
@paulirish
paulirish / readme.md
Last active April 2, 2024 20:18
resolving the proper location and line number through a console.log wrapper

console.log wrap resolving for your wrapped console logs

I've heard this before:

What I really get frustrated by is that I cannot wrap console.* and preserve line numbers

We enabled this in Chrome DevTools via blackboxing a bit ago.

If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. Click, and the full source is looking longingly into your eyes.

@aaronksaunders
aaronksaunders / Flickr-Search-Example:-Using-Controller-As-syntax-and-ui-router-resolve.markdown
Last active May 10, 2017 20:04
Flickr Search Example: Using Controller As syntax and ui-router resolve

Flickr Search Example: Using Controller As syntax and ui-router resolve

Demo of loading images using the Flickr API with IonicFramework

showing ui-router functionality of controller as for cleaner looking code.

A Pen by aaron k saunders on CodePen.

License.