Skip to content

Instantly share code, notes, and snippets.

View neekey's full-sized avatar
🎯
Focusing

Neekey neekey

🎯
Focusing
View GitHub Profile

Mac自带的Boot Camp程序,可以非常便利地帮助用户在Mac电脑上同时安装一个Windows系统。针对Macbook Air用户,这里记录下在没有光驱的情况下,使用USB制作启动盘来安装Windows的过程。

需要准备的物品:

1、U盘一个(>= 4g) 2、win7镜像文件(.iso) 3、rEFIT.dmg(用于让不支持USB等外设设备启动引导的设备能识别USB设备启动)

制作启动盘

@neekey
neekey / loader.js
Created September 4, 2012 02:57
跨域iframe自适应高度脚本
/**
* 跨域iframe自适应高度脚本
*/
var Loader = new function(){
var doc = document,body = doc.body,
self = this,
//获取url中的参数
getRequest = function(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i"),
@neekey
neekey / use-node-open-terminal.md
Created May 10, 2013 04:19
在nodeJS中启动一个teminal窗口执行相关进程

Mac

使用open 命令,调用terminal来打开abc这个文件:

open -a /Applications/Utilities/Terminal.app "abc"

期中-a这个参数保证打开一个新的terminal实例

@neekey
neekey / dockerfile
Created May 2, 2018 00:53
create node and npm and puppeteer in Docker
FROM python:3.6
ADD . /app
WORKDIR /app
#
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# install node and npm for query thumbnail process
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
"""Run the unit tests."""
import unittest
import sys
def iterate_test_cases(test_suite_or_case):
"""Iterate through all of the test cases in 'test_suite_or_case'."""
try:
suite = iter(test_suite_or_case)
except TypeError:
@neekey
neekey / gist-blog-use-node-module-with-meteor.md
Created March 9, 2013 08:31
在Meteor中使用node.js的模块系统

这是Meteor的大坑,希望以后这块能做的更好。

首先,在Meteor中,由于经过了沙箱的封装,无法直接触碰到require, module等全局变量。

且,Meteor会自动执行所有不在testpublic目录下的js文件,因此我们需要使用的npm模块都需要安装到public目录下。

然后使用meteor-node-module进行模块的加载。

举例,我们现在需要使用mustache,那么cdpublic目录下,安装之npm install mustache,然后在我们的代码中使用:

@neekey
neekey / multipleCacheMemoize.js
Last active February 14, 2017 11:52
multipleCacheMemoize
/* eslint-disable */
import { createSelectorCreator } from 'reselect';
function execFunc(func, ...args) {
return func(...args);
}
function multipleCacheMemoize(func) {
const argsArray = [];
const resultArray = [];
git ftp catchup -u username -p password --remote-root htdoc/daigou --syncroot build --version --verbose ftp://host.example.com:21
@neekey
neekey / app.js
Created June 26, 2016 04:17
React-router-lazy-load-component
// @link https://github.com/reactjs/react-router/blob/v0.13.3/examples/partial-app-loading/app.js
var React = require('react');
var Router = require('react-router');
var { Route, RouteHandler, Link } = Router;
var AsyncElement = {
loadedComponent: null,
load: function () {
if (this.constructor.loadedComponent)
@neekey
neekey / gist-blog-Cordova(PhoneGap)-plugin.md
Created December 24, 2012 10:01
Cordova(PhoneGap)插件编写