Get it? Site? oh man.
Demos for GreenSock's latest 18.0 release, with stagger cycle and hsl tweens, as well as jQuery3.0 with class operations on SVG. So many goodies. SVG.
A Pen by Sarah Drasner on CodePen.
| defmodule GCM.PushCollector do | |
| use GenStage | |
| # Client | |
| def push(pid, push_requests) do | |
| GenServer.cast(pid, {:push, push_requests}) | |
| end | |
| # Server |
| defmodule GCM.Pusher do | |
| use GenStage | |
| # The maximum number of requests Firebase allows at once per XMPP connection | |
| @max_demand 100 | |
| defstruct [ | |
| :producer, | |
| :producer_from, | |
| :fcm_conn_pid, | |
| :pending_requests, |
| /* This is a concatenation of the following files from | |
| https://github.com/Seeed-Studio/Grove_LED_Bar (LGPL): | |
| - Grove_LED_Bar.h | |
| - Grove_LED_Bar.cpp (less the #include for the above header) | |
| and the code from | |
| https://www.hackster.io/karel/grove-led-bar-controller-with-the-bean-c3b81e | |
| (less the #include for the above header) with corrections from the | |
| comments. */ | |
| #!/bin/bash | |
| sudo apt-get update | |
| sudo apt-get --assume-yes install wget | |
| sudo apt-get --assume-yes install libssl-dev | |
| sudo apt-get --assume-yes install ncurses-dev | |
| sudo apt-get --assume-yes install m4 | |
| # erlang | |
| wget http://erlang.org/download/otp_src_18.2.tar.gz | |
| tar -xvzf otp_src_18.2.tar.gz | |
| cd otp_src_18.2 |
| if ! Enum.member?(:erlang.loaded, IEx.UserDrv.Config) do | |
| defmodule IEx.UserDrv.Config do | |
| import Process, only: [group_leader: 0] | |
| @moduledoc """ | |
| Structure to hold :user_drv configuration information. | |
| """ | |
| defstruct node: Node.self, pid: nil, port: nil, leader: group_leader |
Get it? Site? oh man.
Demos for GreenSock's latest 18.0 release, with stagger cycle and hsl tweens, as well as jQuery3.0 with class operations on SVG. So many goodies. SVG.
A Pen by Sarah Drasner on CodePen.
| (ns bnd-utils) | |
| ; Based on the definition of defn- | |
| (defmacro def- | |
| "same as def, yielding non-public def" | |
| [name & decls] | |
| (let [m (assoc (meta name) :private true)] | |
| `(do | |
| (def ~name ~@decls) | |
| (alter-meta! (var ~name) assoc :private true)) |
| // ==UserScript== | |
| // @name smile_amazon_com | |
| // @namespace http://orderthruchaos.bitbucket.org/ | |
| // @copyright 2015+, Brett DiFrischia | |
| // @license | |
| // @description Always remember to smile! | |
| // @grant GM_log | |
| // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js | |
| // @include http://www.amazon.com/* | |
| // @include https://www.amazon.com/* |
| // ==UserScript== | |
| // @name hex_pm_hexdocs_link | |
| // @namespace http://orderthruchaos.bitbucket.org/ | |
| // @copyright 2015+, Brett DiFrischia | |
| // @license | |
| // @description | |
| // @grant GM_log | |
| // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js | |
| // @include https://hex.pm/packages/* | |
| // ==/UserScript== |
| function [ sigmas ] = rand_sig( s1, s2, p, n ) | |
| % RAND_SIG Generate random list of sigmas | |
| % sigs = rand_sig(0.5, 0.45, 0.65, 100000); | |
| % | |
| % Arguments: | |
| % s1 = first standard deviation | |
| % s2 = second standard deviation | |
| % p = probability (decimal) of s1 occurring | |
| % n = number of items to generate |