(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.
| import React, { useContext } from 'react' | |
| import ReactDOM from 'react-dom/server' | |
| import ssrPrepass from 'react-ssr-prepass' | |
| const Context = React.createContext() | |
| const asyncFoo = async () => 'foo' | |
| function MyComponent() { | |
| const tracker = useContext(Context) |
| setProxy(){ | |
| export all_proxy=socks://url.to.proxy:80 | |
| export http_proxy=http://url.to.proxy:80 | |
| export https_proxy=$http_proxy | |
| export ftp_proxy=$http_proxy | |
| export ALL_PROXY=$all_proxy | |
| export HTTP_PROXY=$http_proxy | |
| export HTTPS_PROXY=$http_proxy | |
| export FTP_PROXY=$http_proxy | |
| export no_proxy="localhost, 127.0.0.1, .internal.domain" |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| // Configuration globale au projet de JSHint | |
| // ========================================= | |
| // | |
| // (Y compris celui intégré à votre EDI/éditeur, normalement) | |
| // | |
| // [Liste complète des options possibles](http://www.jshint.com/docs/options/) | |
| { | |
| // Options de restriction | |
| // ---------------------- |
| var Proxy = require('./proxy.js'); | |
| var HttpWrap = module.exports = function(http) { | |
| Proxy.wrap(http.Server.prototype, ['on', 'addListener'], function(addListener) { | |
| return function(event, listener) { | |
| if (!(event === 'request' && typeof listener === 'function')) return addListener.apply(this, arguments); | |
| return addListener.call(this, event, function(request, response) { | |
| var self = this; |
| #!/bin/sh | |
| BACKUP_DATE=`date +%Y-%m-%d_%H-%M-%S` | |
| BACKUP_DIR="~/PEAK/BACKUPS/$BACKUP_DATE" | |
| mkdir -p "$BACKUP_DIR" | |
| cd "$BACKUP_DIR" | |
| sudo adb pull /data/local/storage/persistent/ |
(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.
| #!/bin/bash | |
| # git-standup: find out what you did yesterday (or last friday). | |
| # | |
| # Setup: | |
| # 1. Change AUTHOR if your git user doesn't match your unix account. | |
| # 2. Save somewhere on your path, make executable. | |
| # 3. git config --global alias.standup '!git-standup' | |
| # 4. Profit. | |
| # | |
| # Original idea via @paulgreg (https://twitter.com/paulgreg/status/248686055727972352) |
| # zsh script checks first if there were any commits done | |
| # by author yesterday. If there were, return those. If | |
| # there weren't, look for all commits since last Friday | |
| # at midnight as it may have been a weekend. | |
| # | |
| # Use your name in the --author for all commands | |
| gitstandup() { | |
| if [ -z "$(git log --all --pretty=format:'* %s' --no-merges --reverse --author=Justin --since=yesterday.midnight)" ]; then | |
| git log --all --pretty=format:'* %s' --no-merges --reverse --author=Justin --since=last.friday.midnight; |
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |