Anything can be an observable!! Even data that never changes!!!
const myObservable = Observable.from('Hello world'); myObservable.subscribe(data => console.log(data));It prints 'Hello world'! Amazing!!
Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.
@broros
otherwise why would he hand over a popular package to a stranger?
If it's not fun anymore, you get literally nothing from maintaining a popular package.
One time, I was working as a dishwasher in a restu
declare module 'rebass/emotion' { | |
import * as Rebass from 'rebass'; | |
import { ComponentClass } from 'react'; | |
import { ThemeProviderProps } from 'emotion-theming'; | |
// Styled System Types | |
export type NumberOrString = Rebass.NumberOrString; | |
export type Responsive = Rebass.Responsive; | |
export interface Space extends Rebass.Space {} |
console.log(1); | |
(_ => console.log(2))(); | |
eval('console.log(3);'); | |
console.log.call(null, 4); | |
console.log.apply(null, [5]); | |
new Function('console.log(6)')(); | |
Reflect.apply(console.log, null, [7]) | |
Reflect.construct(function(){console.log(8)}, []); | |
Function.prototype.apply.call(console.log, null, [9]); | |
Function.prototype.call.call(console.log, null, 10); |
#!/usr/bin/python3 | |
# backup-rescuetime.py: Backup all of last month's rescuetime data | |
# | |
# Columns are Date,Time Spent (seconds),Number of People,Activity,Category,Productivity | |
# Rows are hourly breakdowns of the activities done | |
# | |
# Must have directory called 'rescuetime_data' in same directory as script | |
# | |
# Sample crontab entry to backup at 6AM on the 1st of every month: | |
# 0 6 1 * * python3 ~/rescuetime/backup-rescuetime.py |
/* First, install dependencies: | |
npm install webpack babel-loader babel-core babel-preset-react --save-dev | |
npm install react react-dom --save | |
Note: babel dependencies are not needed if you aren't using jsx) | |
*/ | |
// webpack.config.js | |
// Note: This assumes a "main.js" file in a src/ directory, and outputs "main.bundle.js" to a dist/ directory |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
local lapis = require "lapis" | |
local app = lapis.Application() | |
app:get("/", function() | |
local http = require "lapis.nginx.http" | |
local util = require "lapis.util" | |
local api = "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?" | |
local res, status = http.simple(api .. util.encode_query_string { | |
url = "http://leafo.net", |
(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.