Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Learning Usool ath-Thalaathah

Yousef Shanawany AskYous

💭
Learning Usool ath-Thalaathah
View GitHub Profile
View potusScraper-v1.js
const rp = require('request-promise');
const url = 'https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States';
rp(url)
.then(function(html){
//success!
console.log(html);
})
.catch(function(err){
//handle error
View msbuild.log
Build started 6/8/2017 3:08:00 PM.
Environment at start of build:
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\Yousef Shanawany\AppData\Roaming
CommonProgramFiles = C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
CommonProgramW6432 = C:\Program Files\Common Files
COMPUTERNAME = AIR-540
ComSpec = C:\WINDOWS\system32\cmd.exe
DevEnvDir = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\
View My Models.js
/**
* Classes.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
View error.txt
Error: request aborted
at IncomingMessage.onAborted (C:...\node_modules\body-parser\node_modules\raw-body\index.js:269:10)
at emitNone (events.js:67:13)
at IncomingMessage.emit (events.js:166:7)
at abortIncoming (_http_server.js:276:11)
at Socket.serverSocketCloseListener (_http_server.js:289:5)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at TCP._onclose (net.js:469:12)
View Results.md
Use Case ID Browser Action Async: True POSTed? Async: False POSTed?
View showPHPErrors.php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
@AskYous
AskYous / isAndroidOrIPhone
Created Jul 8, 2015
Detect if User is on iPhone or Android
View isAndroidOrIPhone
function detectBrowser() {
var useragent = navigator.userAgent;
var mapdiv = document.getElementById("map-canvas");
if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1 ) {
console.log('You are on an Android or iPhone!');
} else {
}
}
You can’t perform that action at this time.