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
| import { Subject } from 'rxjs/Subject'; | |
| import { BehaviorSubject } from 'rxjs/BehaviorSubject'; | |
| import { Subscription } from 'rxjs/Subscription'; | |
| export default class RxEvent { | |
| /** | |
| * Hash map of subjects | |
| * @type {Subject} | |
| */ | |
| private subjects: { [key: string]: Subject<any> } = {}; |
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
| import { Component } from '@angular/core'; | |
| import { SeoService } from 'path/to/seo.service'; | |
| @Component({ | |
| selector: 'app-root', | |
| template: `` | |
| }) | |
| export class AppComponent { | |
| constructor(seoService: SeoService) { |
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 gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| var watch = require('gulp-watch'); | |
| var autoprefix = require('gulp-autoprefixer'); | |
| var del = require('del'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var flatten = require('gulp-flatten'); | |
| var gutil = require('gulp-util'); | |
| var FILES = { |
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
| import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, Renderer } from '@angular/core'; | |
| import { ControlValueAccessor } from '@angular/forms'; | |
| import { Config } from '../../config/config'; | |
| import { Picker, PickerController } from '../picker/picker'; | |
| import { Form } from '../../util/form'; | |
| import { Ion } from '../ion'; | |
| import { Item } from '../item/item'; | |
| import { DateTimeData, LocaleData } from '../../util/datetime-util'; | |
| export declare const DATETIME_VALUE_ACCESSOR: any; | |
| /** |
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
| <?php | |
| //$arr = array(10, -1, 10, -1, 4, 5, 0); | |
| $arr = array(-3, 0, -4); | |
| $brr = array(); | |
| for($i = 0, $n = count($arr); $i < $n; ++$i) { | |
| $a = abs($arr[$i]); | |
| if ($a) { | |
| $brr[] = $a; | |
| } | |
| } |
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
| # protect xmlrpc Allow from list IP | |
| <Files xmlrpc.php> | |
| Order Deny,Allow | |
| Deny from all | |
| Allow from IP-1 | |
| Allow from IP-2 | |
| </Files> |
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
| # protect xmlrpc Deny all access to this file | |
| <Files xmlrpc.php> | |
| Order Deny,Allow | |
| Deny from all | |
| </Files> |
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
| # protect xmlrpc Redirect to specific page | |
| <IfModule mod_alias.c> | |
| Redirect 301 /xmlrpc.php http://homepage.com/ | |
| </IfModule> |
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
| # protect xmlrpc return 403 Error when access this file. | |
| <IfModule mod_alias.c> | |
| RedirectMatch 403 /xmlrpc.php | |
| </IfModule> |
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
| curl http://www.site-wp.com/xmlrpc.php -d | |
| '<?xml version="1.0" encoding="iso-8859-1"?><methodCall><methodName> | |
| pingback.ping</methodName><params><param><value> | |
| <string>http://attacked.site.com/link_to_post | |
| </string></value></param><param><value><string> | |
| http://www.site-wp.com/any_blog_post/ | |
| </string></value></param></params></methodCall>' |
NewerOlder