Skip to content

Instantly share code, notes, and snippets.

var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@Clarence-pan
Clarence-pan / number_format.js
Created October 31, 2017 02:23 — forked from ricardoriogo/number_format.js
Javascript version of php number_format function
function number_format (number, decimals, dec_point, thousands_sep) {
// http://kevin.vanzonneveld.net
// + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfix by: Michael White (http://getsprink.com)
// + bugfix by: Benjamin Lupton
// + bugfix by: Allan Jensen (http://www.winternet.no)
// + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
// + bugfix by: Howard Yeend
// + revised by: Luke Smith (http://lucassmith.name)

解决 Git 在 windows 下中文乱码的问题

原因

中文乱码的根源在于 windows 基于一些历史原因无法全面支持 utf-8 编码格式,并且也无法通过有效手段令其全面支持。

解决方案

  1. 安装
@Clarence-pan
Clarence-pan / v2ex_auto_login.py
Last active August 29, 2015 14:27 — forked from tdoly/v2ex_auto_login.py
v2ex 自动登录,领取金币脚本
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys
import logging
import datetime
import requests
import BeautifulSoup
from requests.adapters import HTTPAdapter
@Clarence-pan
Clarence-pan / my.css
Last active August 29, 2015 14:26 — forked from anonymous/my.css
CSS Gradient Animation
background: linear-gradient(207deg, #10ec6f, #172de1);
background-size: 400% 400%;
-webkit-animation: test 6s ease infinite;
-moz-animation: test 6s ease infinite;
-o-animation: test 6s ease infinite;
animation: test 6s ease infinite;
@-webkit-keyframes test {
    0%{background-position:58% 0%}
    50%{background-position:43% 100%}
    100%{background-position:58% 0%}
@Clarence-pan
Clarence-pan / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console