start new:
tmux
start new with session name:
tmux new -s myname
| # yum list \*openssl\* | |
| yum install -y openssl098e | |
| yum install -y zlib | |
| ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8 | |
| ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8 | |
| ln -s /lib64/libbz2.so.1 /lib64/libbz2.so.1.0 | |
| wget https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2 | |
| tar -xf pypy-1.8-linux64.tar.bz2 | |
| cp -r pypy-1.8 /opt | |
| ln -s /opt/pypy-1.8/bin/pypy /usr/local/bin |
| # -*- coding: utf-8 -*- | |
| # Export Result Set As Excel Xlsx File | |
| # | |
| # Usage: | |
| # 1. Install Python(2.7) Module "XlsxWriter", See http://xlsxwriter.readthedocs.org/getting_started.html | |
| # 2. In MySQL Workbench | |
| # Scripting => Install Plugin/Module... => <select this script> => <restart workbench> | |
| # | |
| # Author: zhwei | |
| # |
| 'use strict'; | |
| var React = require('react'); | |
| function createAsyncHandler(getHandlerAsync, displayName) { | |
| var Handler = null; | |
| return React.createClass({ | |
| displayName: displayName, |
This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
| class ExceptionTestCase: XCTestCase { | |
| func raisesException() { | |
| var exception = NSException(name: NSInternalInconsistencyException, reason: "Testing exceptions", userInfo: nil) | |
| XCTAssertThrows({ exception.raise() }, "Should raise an exception) | |
| XCTAssertThrowsSpecific({ exception.raise() }, NSInternalInconsistencyException, "Should raise NSInternalInconsistencyException") | |
| } | |
| } |
| //https://github.com/facebook/jest/blob/master/examples/react-es6/CheckboxWithLabel.js | |
| //import React from 'react'; //original, can work | |
| import React from 'custom/react'; //not work | |
| class CheckboxWithLabel extends React.Component { | |
| constructor(props) { | |
| super(props); |
| #!/usr/bin/env python | |
| """ | |
| A pure python ping implementation using raw socket. | |
| Note that ICMP messages can only be sent from processes running as root. | |
| Derived from ping.c distributed in Linux's netkit. That code is |