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 | |
~/WebStorm9/bin/webstorm.sh |
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
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=WebStorm | |
Icon=/home/xxgov/WebStorm9/bin/webide.png | |
Exec="/home/xxgov/idea-IU-143.1184.17/bin/idea.sh" %f | |
Comment=Develop with pleasure! | |
Categories=Development;IDE; | |
Terminal=false | |
StartupWMClass=jetbrains-webstorm |
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 Product(name, price) { | |
this.name = name; | |
this.price = price; | |
} | |
function Food(name, price) { | |
Product.call(this, name, price); | |
this.category = 'food'; | |
} |
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
{ | |
"default_encoding": "UTF-8", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"font_size": 16, | |
"ignored_packages": | |
[ | |
"Autoprefixer", | |
"Vintage" | |
], |
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
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | |
expires 1h; | |
} | |
location ~* \.(?:html)$ { | |
expires 1h; | |
} |
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 getQueryStringByName(name){ | |
var result = location.search.match(new RegExp("[\?\&]" + name+ "=([^\&]+)","i")); | |
if(result == null || result.length < 1){ | |
return ""; | |
} | |
return result[1]; | |
} |
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 j = document.createElement('script'); | |
j.async = "async"; | |
j.src = 'https://lib.sinaapp.com/js/jquery/1.10.2/jquery-1.10.2.min.js'; | |
j.onload = genPic; | |
document.querySelector('head').appendChild(j); | |
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
document.addEventListener("DOMContentLoaded", function(event) { | |
mycanvas(); | |
}); | |
function mycanvas(){ | |
var ratio = window.devicePixelRatio || 1, | |
canvas = document.querySelector('canvas'), | |
context = canvas.getContext('2d'); | |
width = canvas.width = window.innerWidth; |
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
{ | |
"name": "xxx-frontend-html", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "gulp", | |
"build": "gulp build" | |
}, |
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
// for demo: http://jsbin.com/jeqesisa/7/edit | |
// for detailed comments, see my SO answer here http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional/21915381#21915381 | |
/* a helper to execute an IF statement with any expression | |
USAGE: | |
-- Yes you NEED to properly escape the string literals, or just alternate single and double quotes | |
-- to access any global function or property you should use window.functionName() instead of just functionName() | |
-- this example assumes you passed this context to your handlebars template( {name: 'Sam', age: '20' } ), notice age is a string, just for so I can demo parseInt later | |
<p> | |
{{#xif " this.name == 'Sam' && this.age === '12' " }} |