<button>Let's Go !</button>
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
#!/bin/bash | |
MY_URL="http://moefou.org" #change you website | |
RESULT_502=`curl -I $MY_URL|grep "HTTP/1.1 502"` | |
RESULT_504=`curl -I $MY_URL|grep "HTTP/1.1 504"` | |
if [ -n "$RESULT_502" ]; then | |
killall php-fpm;php-fpm | |
date>>/data/logs/web_error.log;echo "502 Bad Gateway">>/data/logs/web_error.log | |
elif [ -n "$RESULT_504" ]; then | |
killall php-fpm;php-fpm | |
date>>/data/logs/web_error.log;echo "504 Gateway Time-out">>/data/logs/web_error.log |
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 | |
/** | |
* Lightens/darkens a given colour (hex format), returning the altered colour in hex format.7 | |
* @param str $hex Colour as hexadecimal (with or without hash); | |
* @percent float $percent Decimal ( 0.2 = lighten by 20%(), -0.4 = darken by 40%() ) | |
* @return str Lightened/Darkend colour as hexadecimal (with hash); | |
*/ | |
function color_luminance( $hex, $percent ) { | |
// validate hex string |
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 { Component, OnInit, OnDestroy } from '@angular/core'; | |
import { Observable } from 'rxjs/Observable'; | |
import { Subject } from 'rxjs/Subject'; | |
import { MyService } from './MyService.ts'; | |
import 'rxjs/add/operator/takeUntil'; | |
@Component({ | |
selector: 'my-rad-component', |
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
language: node_js | |
node_js: | |
- "6" | |
script: | |
- npm run lint | |
- npm run build | |
- npm test |
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
<!-- wInViewRoot directive is needed to specify the `root` for `IntersectionObserver` and some other it's options e.g. `margin` --> | |
<div class="container" wInViewRoot="viewport"> | |
Any content can be here | |
<w-in-view-item> | |
<!-- Content will be replaced by a placeholder <div> with the same height as original content. | |
Also `InViewItemComponent`s change detector will be detached when it become invisible which means | |
all the content's change detectors won't be reachable and will be inactive as well. --> | |
</w-in-view-item> | |
...or any other content can be here | |
<w-in-view-item> |
by Wassim Chegham (@manekinekko)
From this awesome animation, originally from this tweet
getData( a => {
getMoreData(a, b => {