Skip to content

Instantly share code, notes, and snippets.

View lovemyliwu's full-sized avatar
😍
feel free

Smite Chow lovemyliwu

😍
feel free
View GitHub Profile
这个一页 BP 模板简单实用,分几个部分:
1. 问题 (Problem)
项目解决什么问题?满足什么需求?
2. 一句话介绍 (Elevator pitch)
用一句话概括问题、受众、解决方案、创新点。
@lovemyliwu
lovemyliwu / python_option_parser_sample
Last active August 29, 2015 14:17
python command args parser
#!/usr/bin/python
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Adds a send mail as to a users Gmail account.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@lovemyliwu
lovemyliwu / js_emoji
Last active August 29, 2015 14:17
emoji character generater
/*
emoji unicode string from http://apps.timwhitlock.info/emoji/tables/unicode
codepoint support from http://stackoverflow.com/questions/3744721/javascript-strings-outside-of-the-bmp
*/
var all_emoji="U+1F601,U+1F602,U+1F603,U+1F604,U+1F605,U+1F606,U+1F609,U+1F60A,U+1F60B,U+1F60C,U+1F60D,U+1F60F,U+1F612,U+1F613,U+1F614,U+1F616,U+1F618,U+1F61A,U+1F61C,U+1F61D,U+1F61E,U+1F620,U+1F621,U+1F622,U+1F623,U+1F624,U+1F625,U+1F628,U+1F629,U+1F62A,U+1F62B,U+1F62D,U+1F630,U+1F631,U+1F632,U+1F633,U+1F635,U+1F637,U+1F638,U+1F639,U+1F63A,U+1F63B,U+1F63C,U+1F63D,U+1F63E,U+1F63F,U+1F640,U+1F645,U+1F646,U+1F647,U+1F648,U+1F649,U+1F64A,U+1F64B,U+1F64C,U+1F64D,U+1F64E,U+1F64F,U+2702,U+2705,U+2708,U+2709,U+270A,U+270B,U+270C,U+270F,U+2712,U+2714,U+2716,U+2728,U+2733,U+2734,U+2744,U+2747,U+274C,U+274E,U+2753,U+2754,U+2755,U+2757,U+2764,U+2795,U+2796,U+2797,U+27A1,U+27B0,U+1F680,U+1F683,U+1F684,U+1F685,U+1F687,U+1F689,U+1F68C,U+1F68F,U+1F691,U+1F692,U+1F693,U+1F695,U+1F697,U+1F699,U+1F69A,U+1F6A2,U+1F6A4,U+1F6A5,U+1F6A7,U+1F6A8
@lovemyliwu
lovemyliwu / re-build empty_db for django
Last active August 29, 2015 14:20
a safe way to re-build empty_db for django
#prepare db for develop
1. ./update_db.sh
#prepare code
1. git checkout develop
2. git pull origin develop
3. python manage.py migrate
#merge code
1. git checkout hotfix
@lovemyliwu
lovemyliwu / pfx pem cer pub pri
Last active August 29, 2015 14:25
openssl command
pfx file:
https://www.openssl.org/docs/apps/pkcs12.html
to a pem file
openssl pkcs12 -in citic_root.pfx -out citic_root.pem -nodes
cer file:
https://www.openssl.org/docs/apps/x509.html
to rsa pub
openssl x509 -in citic_test_server.cer -pubkey -noout
@lovemyliwu
lovemyliwu / 外语学习的真实方法及误区.txt
Created September 11, 2015 05:28
外语学习的真实方法及误区
著名语言学家Greg Thomson说的:“外语学习的原理是如此之复杂,以至于没有人能说清楚;但掌握语言的过程又是如此之简单,以至于不需要说清楚。”讨论语言学习的原理,是件非常复杂的事,在下当然也没把握能描述得很清楚。而且因为外语学习就连学术界都存在很多尖锐的争论,本人也不敢说自己有把握能把争论化解。但还是决定先从简单入手,做些抛砖引玉的工作吧,探讨一下外语学习的真谛,特别是对大家在外语学习上普遍存在的误解进行分析和澄清,希望能对外语学习者有所帮助,对外语教学工作着有所启发,就知足了。
对外语学习的主要误区
我们普遍对学外语学习方法的认识是:
1.要有语言环境, 多跟外国人交流,最好是能出国,不久自然就能会说了。
open console
$('.branch-delete').not('.disabled').click()
@lovemyliwu
lovemyliwu / base_html.html
Created November 18, 2015 09:56
Basic Html Constructer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<title>Future Visions</title>
<meta name="description" content="Everything you need to know about Future Visions">
<meta name="keywords" content="Future Visions, book, Microsoft, sci-fi">
@lovemyliwu
lovemyliwu / load_jquery.js
Created November 18, 2015 10:17
Load JQuery from anywhere
var script = document.createElement('script');
script.onload = function() {
jQuery.noConflict();
if (callback) {
callback(jQuery);
}
};
script.src = "http://code.jquery.com/jquery-2.1.1.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
@lovemyliwu
lovemyliwu / base_javascript.js
Last active November 18, 2015 16:27
Basic Scope Closure of Javascript
// define root module
var rm = rm || {};
// define a module under root module
rm.person = function (win, doc) {
// current module
var module = {
// module var
coding: "utf-8",
// module function another name is static function