Skip to content

Instantly share code, notes, and snippets.

itanxiao chenzhenjia

Block or report user

Report or block chenzhenjia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View WBLogin.js
const rp = require('request-promise');
const RSAKey = require('./WBPassword');
const Promise = require('promise');
// rp.debug = true;
/**
* 微博的预先登录,用来获取微博的公钥
* @param username 用户名
*/
@chenzhenjia
chenzhenjia / WBPassword.js
Created Oct 16, 2017
微博加密密码的 js
View WBPassword.js
const RSAKey = function () {
function bt (a) {
var b = bp(a, this.n.bitLength() + 7 >> 3);
if (b == null)
return null;
var c = this.doPublic(b);
if (c == null)
return null;
var d = c.toString(16);
View RandomUtils.java
private static final List<String> PWD_CHARS;
static {
PWD_CHARS = new ArrayList<String>();
PWD_CHARS.add("123456789");
PWD_CHARS.add("qwertyuipkjhgfdsazxcvbnm");
PWD_CHARS.add("QWERTYUPLKJHGFDSAZXCVBNM");
}
/**
@chenzhenjia
chenzhenjia / Input.js
Created Jul 27, 2017
react native 的自定义的 input,可以在右边显示其它组件
View Input.js
import React from 'react';
import {
TextInput,
View,
StyleSheet
} from 'react-native';
import PropTypes from 'prop-types'
export default class LoginInput extends React.Component {
constructor (props) {
@chenzhenjia
chenzhenjia / Input.js
Created Jul 27, 2017
react native 的自定义圆角 input
View Input.js
import React from 'react';
import {
TextInput,
View,
StyleSheet
} from 'react-native';
import PropTypes from 'prop-types'
export default class LoginInput extends React.Component {
constructor (props) {
@chenzhenjia
chenzhenjia / ProgressAlert.js
Created Jul 26, 2017
使用 antd-mobile 封装的 react-native ProgressAlert组件
View ProgressAlert.js
import React from 'react';
import {
StyleSheet,
View,
Text
} from 'react-native';
import { Modal, Progress } from 'antd-mobile';
import PropTypes from 'prop-types';
@chenzhenjia
chenzhenjia / main.cpp
Created Jul 20, 2017
c++ v8 调用 JavaScript 函数
View main.cpp
#include <iostream>
#include <fstream>
#include <v8.h>
#include <libplatform/libplatform.h>
using namespace v8;
using namespace std;
class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
public:
You can’t perform that action at this time.