This file contains 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
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
This file contains 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
// svg | |
<svg class="elephant"> | |
<g transform="scale(3)"> | |
<polygon id="Page-1" points="23.3328895 11.1580892 22.8418363 11.1580892 16.0917836 17.9081419 12.9359147 14.7522731 12.4448616 14.7522731 9.95540651 17.224721 9.95540651 17.7157742 15.8467128 23.60708 16.337766 23.60708 25.8053725 14.1394735 25.8053725 13.6484203"></polygon> | |
</g> | |
</svg> | |
// js | |
var polys = document.querySelectorAll('polygon,polyline'); | |
[].forEach.call(polys,convertPolyToPath); |
This file contains 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 evalBool(str){ | |
if( str[0] === 't' && | |
str[1] === 'r' && | |
str[2] === 'u' && | |
str[3] === 'e' | |
){ | |
return true; | |
} | |
if( str[0] === 'f' && |
This file contains 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
android.permission.REAL_GET_TASKS | |
android.permission.ACCESS_CACHE_FILESYSTEM | |
android.permission.REMOTE_AUDIO_PLAYBACK | |
android.permission.REGISTER_WINDOW_MANAGER_LISTENERS | |
android.permission.INTENT_FILTER_VERIFICATION_AGENT | |
android.permission.BIND_INCALL_SERVICE | |
android.permission.WRITE_SETTINGS | |
android.permission.CONTROL_KEYGUARD | |
android.permission.CONFIGURE_WIFI_DISPLAY | |
android.permission.ACCESS_WIMAX_STATE |
This file contains 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
ANDROID CLI | |
1) Create Project | |
android create project \ | |
--target 1 \ | |
--name MyProjectName \ | |
--path ./ProjectFolderPath \ | |
--activity MyActivityName \ | |
--package com.yourdomain.yourproject |
This file contains 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
var AWS = require('aws-sdk'); | |
AWS.config.region = 'your aws region'; | |
AWS.config.update({ | |
accessKeyId: "your access id", | |
secretAccessKey: "your secret access key", | |
}); | |
var sns = new AWS.SNS(); | |
var params = { |
This file contains 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
module.exports = function(grunt){ | |
grunt.initConfig({ | |
coffee: { | |
compile: { | |
options: { | |
bare: true, | |
sourceMap:true | |
}, | |
files: { |
This file contains 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
chrome.storage.sync.get(null, function(items) { | |
var allKeys = Object.keys(items); | |
console.log(allKeys); | |
}); |
This file contains 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 () { | |
var i, elements = document.querySelectorAll('body *'); | |
for (i = 0; i < elements.length; i++) { | |
if (getComputedStyle(elements[i]).position === 'fixed') { | |
elements[i].parentNode.removeChild(elements[i]); | |
} | |
} | |
})(); |
This file contains 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
/** @jsx React.DOM */ | |
var LopMonHoc = React.createClass({ | |
getInitialState: function(){ | |
return {data: []} | |
}, | |
loadData: function(){ | |
$.ajax({ | |
url: '/daotao/lops', | |
success: function(data){ |
NewerOlder