$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
| var http = require('https'); | |
| var querystring = require('querystring'); | |
| // set the post request options | |
| var reqOptions = { | |
| hostname: 'hooks.slack.com', | |
| port: 443, | |
| path: '/services/YOUR/SLACK/HOOK_HERE', | |
| method: 'POST' | |
| }; |
| /* @param alpha boolean | |
| * if true a random value for the alpha channel is calculated, else alpha channel = 1 (full saturation) | |
| */ | |
| var randomPastelColor = function (alpha) { | |
| var rndm = function (f) { return Math.floor(Math.random() * f)}, | |
| pstlfy = function (p) { return Math.round((p + 255) / 2)}, | |
| r = pstlfy(rndm(256)), | |
| g = pstlfy(rndm(256)), | |
| b = pstlfy(rndm(256)), | |
| a = alpha ? rndm(11) / 10 : 1 |
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
- No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
- VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
- VPC with NAT, The best of both worlds, AWS services and web.
These are the Terminal commands I recently used (June 2016) to install Git 2.9.0 from source on RHEL 7.x. I ran this in a VirtualBox VM after a fresh install from the ISO.
You mileage will vary as the yum packages are updated over time. The yum install line below should include all the dependencies, at least it did for me. Depending upon how often you use yum update you may need to run yum --enablerepo=base clean metadata as su before you run the following commands.
cd ~/Downloads
su
yum install autoconf cpio curl-devel expat-devel gcc gettext-devel make openssl-devel perl-ExtUtils-MakeMaker zlib-devel
wget -O v2.9.0.tar.gz https://github.com/git/git/archive/v2.9.0.tar.gzNão é simples fazer testes de aplicações react-native no device, por isso a maior parte das pessoas preferem testar separadamente os componentes (test unitários) usando o node.js e usar outras ferramentas para test de integração.
Dessa forma os testes unitários são como qualquer outro teste node.js. Você é livre para usar qualquer framework de testes, apesar da documentação oficial recomendar o uso do jest.
- Referências: Por se tratar de uma tecnologia em franca fase de desenvolvimento, muitas das referências para react-native estão desatualizadas ou imprecisas. Tome bastante cuidado principalmente no que se refere a syntax de ES5 e ES6;
| class ProgrammaticallyTextFilter extends React.Component { | |
| /* There're two way that you can filter data */ | |
| handleBtnClick = () => { | |
| this.refs.nameCol.applyFilter('Item name 3'); | |
| } | |
| /* This is also work for filtering */ | |
| handleBtnClick1 = () => { | |
| this.refs.table.handleFilterData({ name: 'Item name 3' }); |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
| const path = require('path'); | |
| const fs = require('fs'); | |
| const express = require('express'); | |
| const React = require('react'); | |
| const App = require('./transpiled/App.js').default; | |
| const { renderToString } = require('react-dom/server'); | |
| const server = express(); | |
| server.get('/', (req, res) => { |