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
// This object contains a string value that in contains a single quote, | |
// a double quote, a backtick, and a backslash. | |
const data = { foo: `a'b"c\`d\\e` }; | |
// Turn the data into its JSON-stringified form. | |
const json = JSON.stringify(data); | |
// Now, we want to insert the data into a script body as a JavaScript | |
// string literal per https://v8.dev/blog/cost-of-javascript-2019#json, | |
// escaping special characters like `"` in the data. |
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
node_modules |
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
{"lastUpload":"2021-10-29T12:55:00.638Z","extensionVersion":"v3.4.3"} |
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
https://jsfiddle.net/xLhLuzf9/318/ |
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
{ | |
"Ansi 6 Color" : { | |
"Green Component" : 0.5372549295425415, | |
"Red Component" : 0.11764705926179886, | |
"Blue Component" : 0.53333336114883423 | |
}, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { |
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
This option will only work for requests to localhost over HTTP. | |
In the Chrome address bar, type “chrome://flags/#allow-insecure-localhost“ | |
Select the “Enable” link. |
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
async componentDidMount() { | |
let response = await this.fetchAsync(this.props.url); | |
await this.setState({feed: response}); // fill the empty feed array in the state obj | |
console.info('bundle response',this.state.feed); | |
} | |
componentWillReceiveProps(nextProps) { |
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
// Check server time stamp agains current time zone | |
(function compareServerTimeStamp(){ | |
var xhr = new XMLHttpRequest(); | |
xhr.onload = function() { | |
var time = Number(this.response.replace(/\D/g,'') + '000'); | |
var date = new Date(time); | |
console.info("Current TimeStamp: ", time); | |
console.info("Current time at our zone: ", date); | |
console.info("Current UNIX time at server: ", date.toISOString()); |
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
var years = [1982, 1993, 1998, 1977, 1965, 1990]; | |
//Single responsibility | |
//Just Calculate the given array data sets array | |
// depends on the type of calculation function being passed | |
function arrayCalc(arr, fn){ | |
var arrRes = []; | |
for (var i = 0; i < arr.length; i++){ | |
arrRes.push(fn(arr[i])); | |
} |
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
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | |
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | |
# User-specific stuff: | |
.idea/**/workspace.xml | |
.idea/**/tasks.xml | |
.idea/dictionaries | |
# Sensitive or high-churn files: | |
.idea/**/dataSources/ |
NewerOlder