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
box@0536908972a6 ~> mkdir -p important/very-important/this.fish | |
box@0536908972a6 ~> mkdir -p usual/not-interested.fish | |
box@0536908972a6 ~> rm important/very-important/this.fish/ -R | |
box@0536908972a6 ~> touch important/very-important/this.fish | |
box@0536908972a6 ~> touch test.fish | |
box@0536908972a6 ~> rm -R usual/not-interested.fish | |
box@0536908972a6 ~> touch usual/not-interested.fish | |
box@0536908972a6 ~> vim |
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
I work on a project for a blog web-site and I'm trying to resolve the issue I constantly get on an article page. | |
On an article page, we have a subscribe form. When user posts a request to subscribe to our blog, the error from Disqus embed file pops up in user's browser console: "TypeError: c is null" in Firefox, or "TypeError: Cannot read property 'sender' of null" in Chrome. | |
I tried to debug the issue and I stumbled upon a global (window.addEv...) 'message' event handler which parses 'data' property of its first parameter as JSON. But! This 'data' parsing is via JSON.parse and JSON.parse(null) throws no error and just returns null, meaning that though Disqus developers embedded the parsing procedure in try-catch statement, the code execution continues until on the next line you try to access property 'sender' of a null. | |
Can you please resolve the issue? |
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
{ | |
"git.confirmSync": false, | |
"editor.tabSize": 2, | |
"window.zoomLevel": -1, | |
"editor.renderControlCharacters": false, | |
"explorer.confirmDragAndDrop": false, | |
"eslint.validate": [ | |
"javascript", | |
"javascriptreact", | |
{ |
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 = { | |
shell: 'C:\\Program Files\\Git\\usr\\bin\\bash.exe', | |
shellArgs: ['-l', '-i'], | |
env: {TERM: 'cygwin'}, | |
/** hypercwd plugin breaks */ | |
} |
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
const pathast = require('path-ast') | |
const fs = require('fs') | |
const pathStr = 'M0.8572927713394165,-1.4711437225341797C0.8572927713394165,-1.4369948508298824,0.8682440455349504,-1.4005078563677493,0.8709338903427124,-1.366212010383606C0.8776826492648646,-1.2801645194985007,0.8804045332926923,-1.1940720868133363,0.8877229690551758,-1.1080797910690308C0.8915414388864679,-1.0632124180838844,0.8846852909889699,-1.0176606977598863,0.8898215889930725,-0.9727177619934082C0.8963484015589094,-0.9156077349521522,0.8963460263068671,-0.8637286793616796,0.8887723088264465,-0.8069254755973816C0.88760593190895,-0.7981775990253006,0.8941220903616892,-0.7752338143373014,0.8887723088264465,-0.7681007385253906C0.8770788784447072,-0.7525094242138122,0.8493030484211967,-0.7501287302461596,0.8321091532707214,-0.7481637001037598C0.7888428424721896,-0.7432189447632457,0.7389142063430592,-0.7438954126416102,0.6956977844238281,-0.7481637001037598C0.6102252345500444,-0.7566054312046374,0.5268991562099881,-0.7773976475199617,0.445960134 |
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
<?php | |
class TrackerPDO { | |
private static $_instance = null; | |
private static $request_log = array(); | |
private function __construct() { | |
} | |
protected function __clone() { |
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
/* | |
* Finished: 30 min | |
*/ | |
function countOfSymbol(arr) { | |
let filter2 = (v) => v == '2' | |
return arr.map((v) => v.toString().split('')) | |
.reduce((prev, curr) => prev.filter(filter2).length >= curr.filter(filter2).length ? prev : curr, []) | |
.join('') || null | |
} |
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
# play white noise right in the terminal https://askubuntu.com/a/789472/352074 | |
play -n synth brownnoise synth pinknoise | |
play -n synth whitenoise |
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 regx = /\d+\D\d+\D\d+/; // to find headers like "20/04/2017" | |
var notes_clstr = ".IZ65Hb-n0tgWb.IZ65Hb-WsjYwc-nUpftc"; | |
var header_clstr = ".IZ65Hb-YPqjbf.r4nke-YPqjbf"; | |
var button_select_clstr = ".Q0hgme-LgbsSe.Q0hgme-Bz112c-LgbsSe.IZ65Hb-NGme3c.VIpgJd-LgbsSe"; | |
var button_not_clstr = ".LwH6nd"; | |
$(notes_clstr).each(function() { | |
// 1. check an header | |
var header_text = $(this).find(header_clstr).not(button_not_clstr).text(); | |
if (!regx.test(header_text)) return; | |
console.log(header_text); |
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
use strict; | |
use warnings; | |
# print "Hello world. " x 80; # умножение | |
# print "\n\nHello world!"; | |
# print "Hello" ge "wor"; | |
# my $var = 'A string'; # объявляем скаляр | |
# print $var; |