(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.
| set-option -ga terminal-overrides ",xterm-256color:Tc" | |
| # plugins | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-pain-control' | |
| set -g @plugin 'tmux-plugins/tmux-resurrect' | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| # Tmux uses a 'control key', let's set it to 'Ctrl-s' | |
| # Reason: 'Ctrl-s' is easier to reach than 'Ctrl-b' |
(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.
| def singleton(cls): | |
| instance = cls() | |
| instance.__call__ = lambda: instance | |
| return instance | |
| @singleton | |
| class A: | |
| def __init__(self): | |
| self.x = 10 |
| #!/usr/bin/env python2.7 | |
| # -*- coding: utf-8 -*- | |
| # vim:ts=2:sw=2:expandtab | |
| import os | |
| import xcb | |
| from xcb.xproto import * | |
| from PIL import Image | |
| XCB_MAP_STATE_VIEWABLE = 2 |
| def func1(arr, output = [], i = 0) | |
| if i == arr.length | |
| output << arr # <= RING DING DING | |
| else | |
| for j in 0...arr.length | |
| arr[j] = i | |
| func1(arr, output, i+1) if arr[1].odd? | |
| end | |
| end | |
| output |
I’m a web app that wants to allow other web apps access to my users’ information, but I want to ensure that the user says it’s ok.
I can’t trust the other web apps, so I must interact with my users directly. I’ll let them know that the other app is trying to get their info, and ask whether they want to grant that permission. Oauth defines a way to initiate that permission verification from the other app’s site so that the user experience is smooth. If the user grants permission, I issue an AuthToken to the other app which it can use to make requests for that user's info.
Oauth2 has nothing to do with encryption -- it relies upon SSL to keep things (like the client app’s shared_secret) secure.
| 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])) { |
| STUDENT: Sir, can I ask a question? | |
| TEACHER: Yes! | |
| STUDENT: How do you put an elephant inside a fridge? | |
| TEACHER: I don't know. | |
| STUDENT: It's easy, you just open the fridge and put it in. I have another question! | |
| TEACHER: Ok, ask. | |
| STUDENT: How to put a donkey inside the fridge? | |
| TEACHER: It's easy, you just open the fridge and put it in. | |
| STUDENT: No sir, You just open the fridge take out the elephant and put it in. | |
| TEACHER: Ooh...ok!! |
Surfvox nói chung là một search engine nhưng hành xử như cc, cài đặt ngầm, chạy ngầm, hijack browser và ngăn chặn gỡ bỏ.
Dính Surfvox, máy sẽ có các triệu chứng như:
Để hốt con sâu này ta cần: