aaa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git ls-files | grep -E '.*\.(ts|tsx|js|html|css|scss|less)$' | xargs cat | wc -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeScript 7 hrs 5 mins █████████████████▌░░░ 83.6% | |
SCSS 36 mins █▌░░░░░░░░░░░░░░░░░░░ 7.2% | |
JavaScript 27 mins █░░░░░░░░░░░░░░░░░░░░ 5.3% | |
JSON 16 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.2% | |
Markdown 2 mins ░░░░░░░░░░░░░░░░░░░░░ 0.6% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set name=app-name | |
set imagePort=8080 | |
set exportPort=8080 | |
docker build -t %name% . | |
REM Get exits container Id. | |
for /F %%i in ('docker ps -a -q --filter="name=%name%"') do ( set containerId=%%i) | |
docker stop %containerId% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
/** | |
* 记录方法使用情况的类 | |
* @param {Array.<boolean>} umMap 初始的使用情况 | |
*/ | |
var UsageManager = function(umMap) { | |
this.umMap = umMap || []; | |
}; | |
/** | |
* 记录新的使用情况 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('crypto').createHash('md5').update('123456').digest("hex") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
origin repo [https://github.com/erikras/react-redux-universal-hot-example](https://github.com/erikras/react-redux-universal-hot-example) | |
1. package.json | |
- remove dependencies about bootstrap | |
- remove dependencies about eslint | |
- remove dependencies about karma | |
- remove scripts about eslint, test | |
2. remove `karma.config.js` | |
2. dev.config.js | |
- remove `eslint-loader` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import LocalAuthentication | |
let context = LAContext() | |
// Custom falllback button text | |
context.localizedFallbackTitle = "Password Enter" | |
// Determine TouchID available or not | |
if context.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, error: nil) { | |
// Trigger TouchID Authentication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func createImageFromImageAndText(image: UIImage, text: String, font: UIFont, color: UIColor, spacing: CGFloat = 5) -> UIImage { | |
let string = NSString(string: text) | |
let textSize = string.sizeWithAttributes([NSFontAttributeName: font]) | |
let size = CGSize( | |
width: textSize.width + spacing + image.size.width, | |
height: max(textSize.height, image.size.height) | |
) | |
UIGraphicsBeginImageContextWithOptions(size, false, 0) | |
let context = UIGraphicsGetCurrentContext() |
NewerOlder