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 http = require('http') | |
| var concat = require('concat-stream') | |
| var urls = process.argv.slice(2) | |
| var strings = [] | |
| function loadURls(){ | |
| var url = urls.shift() | |
| if(!url){ | |
| strings.forEach(myString => { | |
| console.log(myString) |
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
| [ | |
| { | |
| "property1": "A quote by Hunter S. Thompson, 1937 - 2005", | |
| "property2": "Whatever else might be said about Nixon — and there is still serious doubt in my mind that he could pass for human — he is a goddamned stone fanatic on every aspect of pro football.\nHunter S. Thompson", | |
| "index": 1, | |
| "url": "http://www.qotd.org/search/single.html?qid=1" | |
| }, | |
| { | |
| "property1": "A quote by Anonymous", | |
| "index": 2, |
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 participants = ["Paul","Matt","Owain","Joe"], | |
| results = [], | |
| hat = _.shuffle(participants); | |
| _.each(participants, function(participant){ | |
| var picked = _.sample(_.without(hat,participant)); | |
| results.push([participant,picked]); | |
| hat = _.without(hat,picked); | |
| }); |
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 reverseArray(items){ | |
| var reversed = []; | |
| for(var i=items.length;i>0;i--){ | |
| reversed.push(items.pop()); | |
| } | |
| return reversed; | |
| }; | |
| console.log(reverseArray(["A","B","C"])); | |
| function reverseArrayInPlace(arrayItems){ |
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
| if ( is_multisite() ) { | |
| global $wpdb; | |
| // get current blogs from DB | |
| $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs} ORDER BY blog_id" ); | |
| foreach ( $blogs as $blog ) { | |
| if ( is_main_site() ) { |
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
| // Don't load plugin unless we are in the admin or called by a cron or Ajax request | |
| if ( ! is_admin() | |
| || ( ! defined( 'DOING_CRON' ) || ! DOING_CRON ) | |
| || ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { | |
| return; | |
| } |
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
| Empty PSI elements should not be passed to createDescriptor. Start: PhpDocTagValue, end: PhpDocTagValue | |
| java.lang.Throwable | |
| at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115) | |
| at com.intellij.codeInspection.ProblemDescriptorBase.<init>(ProblemDescriptorBase.java:70) | |
| at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:75) | |
| at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:64) | |
| at com.intellij.codeInspection.ProblemsHolder.registerProblem(ProblemsHolder.java:66) | |
| at com.sensiolabs.insight.inspection.SensioLabsLocalXmlInspection$1.onLineMatch(SensioLabsLocalXmlInspection.java:51) | |
| at com.sensiolabs.insight.psi.PsiViolationUtil.attachLineViolations(PsiViolationUtil.java:65) | |
| at com.sensiolabs.insight.inspection.SensioLabsLocalXmlInspection.buildVisitor(SensioLabsLocalXmlInspection.java:47) |
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_dump(chmod( $this->path->get_default_path(), 0555 )); | |
| var_dump("owner of the current PHP script " . get_current_user()); | |
| print_r(posix_getpwuid(fileowner($this->path->get_default_path()))); | |
| var_dump(substr(sprintf('%o', fileperms($this->path->get_default_path())), -4)); |
This file has been truncated, but you can view the full file.
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
| 0 info it worked if it ends with ok | |
| 1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', '-g', 'browser-sync' ] | |
| 2 info using [email protected] | |
| 3 info using [email protected] | |
| 4 verbose node symlink /usr/local/bin/node | |
| 5 silly cache add args [ 'browser-sync', null ] | |
| 6 verbose cache add spec browser-sync | |
| 7 silly cache add parsed spec { raw: 'browser-sync', | |
| 7 silly cache add scope: null, | |
| 7 silly cache add name: 'browser-sync', |