These have moved to Nijikokun/utils.js on Github!
| # Poor Man's Fiber (API compatible Thread based Fiber implementation for Ruby 1.8) | |
| # (c) 2008 Aman Gupta (tmm1) | |
| unless defined? Fiber | |
| require 'thread' | |
| class FiberError < StandardError; end | |
| class Fiber | |
| def initialize |
| gem 'haml', '3.0.18' |
| var assets = [ | |
| 'http://localhost/offline-assets/fancybox/jquery.fancybox-1.3.4.js', | |
| 'http://localhost/offline-assets/fancybox/jquery.fancybox-1.3.4.css' | |
| ]; | |
| for (var i=0,l=assets.length; i<l; i++) { | |
| loadAsset(assets[i]); | |
| } | |
| function loadAsset(url){ |
| #!/bin/sh | |
| # | |
| # Runs during git flow release start | |
| # | |
| # Positional arguments: | |
| # $1 Version | |
| # | |
| # Return VERSION - When VERSION is returned empty gitflow | |
| # will stop as the version is necessary | |
| # |
| $ cat test.js | |
| function foo () { while (true) { } } | |
| function bar () { return foo(); } | |
| bar(); | |
| $ node test.js & | |
| $ gdb attach $(pidof node) | |
| 0x00000bf778c63d5f in ?? () | |
| (gdb) b v8::internal::Runtime_StackGuard | |
| Breakpoint 1 at 0x84a1f0 | |
| (gdb) print 'v8::V8::TerminateExecution'(0) |
| var dom = Bloop.dom; | |
| var Box = Bloop.createClass({ | |
| getInitialState: function() { | |
| return { number: 0 }; | |
| }, | |
| updateNumber: function() { | |
| this.state.number++; | |
| }, |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutation
Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.
There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.
Libraries are sorted by github popularity.
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |