Skip to content

Instantly share code, notes, and snippets.

View 9nix00's full-sized avatar
💭
不要问star去哪里了,因为微软收购了

Stormxx 9nix00

💭
不要问star去哪里了,因为微软收购了
View GitHub Profile
@9nix00
9nix00 / install-pypy.sh
Created May 7, 2016 12:05 — forked from baoshan/install-pypy.sh
Install PyPy on CentOS
# 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
@9nix00
9nix00 / export2xlsx.py
Created April 17, 2016 15:30 — forked from zhwei/export_as_xlsx.py
MySQL Workbench Plugin: Export Result Set As Excel Xlsx
# -*- 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
#
@9nix00
9nix00 / tmux-cheatsheet.markdown
Created February 2, 2016 11:50 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@9nix00
9nix00 / createAsyncPage.jsx
Created January 6, 2016 01:56 — forked from gaearon/createAsyncPage.jsx
Webpack's async code splitting with React Router
'use strict';
var React = require('react');
function createAsyncHandler(getHandlerAsync, displayName) {
var Handler = null;
return React.createClass({
displayName: displayName,
@9nix00
9nix00 / README.md
Created December 15, 2015 02:40 — forked from denji/README.md
Remove WebStorm; PhpStorm; PyCharm; RubyMine; AppCode; CLion, IntelliJ; 0xDBE10 settings and cli-links from Mac OSX

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
@9nix00
9nix00 / blog-webpack-2.md
Created November 22, 2015 09:03 — forked from xjamundx/blog-webpack-2.md
From Require.js to Webpack - Part 2 (the how)

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:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

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.

@9nix00
9nix00 / TestCase.swift
Created October 16, 2015 12:05 — forked from akolov/TestCase.swift
Testing for XCTAssertThrows in Swift
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);
@9nix00
9nix00 / md-menu.html
Last active August 29, 2015 14:16 — forked from cloudsben/md-menu.html
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
$(document).ready(function(){
$("h2,h3,h4,h5,h6").each(function(i,item){
var tag = $(item).get(0).localName;
@9nix00
9nix00 / ping.py
Last active August 29, 2015 14:14 — forked from zed/ping.py
#!/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