(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| ;;"C:\Users\rnwol\.emacs.d\private\org-roam\packages.el" | |
| (defconst org-roam-packages | |
| '(org-roam)) | |
| (defun org-roam/init-org-roam () | |
| (use-package org-roam | |
| :hook | |
| (after-init . org-roam-mode) | |
| :custom | |
| (org-roam-directory "~/org-roam") |
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference/hit 1.5 ns 4 cycles | |
| Floating-point add/mult/FMA operation 1.5 ns 4 cycles | |
| L2 cache reference/hit 5 ns 12 ~ 17 cycles | |
| Branch mispredict 6 ns 15 ~ 20 cycles | |
| L3 cache hit (unshared cache line) 16 ns 42 cycles | |
| L3 cache hit (shared line in another core) 25 ns 65 cycles | |
| Mutex lock/unlock 25 ns | |
| L3 cache hit (modified in another core) 29 ns 75 cycles |
| // v2 of the great example of SSE in go by @ismasan. | |
| // includes fixes: | |
| // * infinite loop ending in panic | |
| // * closing a client twice | |
| // * potentially blocked listen() from closing a connection during multiplex step. | |
| package main | |
| import ( | |
| "fmt" | |
| "log" |
| const request = require('request-promise'); | |
| const errors = require('feathers-errors'); | |
| const options = { | |
| idField: 'sub', | |
| issuer: 'iss' | |
| }; | |
| module.exports = function() { |
| ;; Auto-scrolling ============================================================== | |
| (defn scroll! [el start end time] | |
| (.play (goog.fx.dom.Scroll. el (clj->js start) (clj->js end) time))) | |
| (defn scrolled-to-end? [el tolerance] | |
| ;; at-end?: element.scrollHeight - element.scrollTop === element.clientHeight | |
| (> tolerance (- (.-scrollHeight el) (.-scrollTop el) (.-clientHeight el)))) | |
| (defn autoscroll-list [{:keys [children class scroll?] :as opts}] |
| /* | |
| * Sample API with GET and POST endpoint. | |
| * POST data is converted to string and saved in internal memory. | |
| * GET endpoint returns all strings in an array. | |
| */ | |
| package main | |
| import ( | |
| "encoding/json" | |
| "flag" |
| /* | |
| * Sample API with GET and POST endpoint. | |
| * POST data is converted to string and saved in internal memory. | |
| * GET endpoint returns all strings in an array. | |
| */ | |
| package main | |
| import ( | |
| "encoding/json" | |
| "flag" |
| __author__ = 'dkarchmer' | |
| ''' | |
| This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
| requires your Django server to have an API for your user to access Cognito based credentials | |
| Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
| to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
| Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
| how to create a stand-alone Python script but operating similarly to these apps. |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // Copyright (c) 2017 Ismael Celis | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all |