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
| const rand = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
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 { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; | |
| import { Observable } from 'rxjs/Observable'; | |
| import { Injectable } from '@angular/core'; | |
| import { AuthService } from '../auth/auth.service'; | |
| @Injectable() | |
| export class AuthInterceptor implements HttpInterceptor { | |
| constructor(private authService: AuthService) {} |
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 FirstFactorial(num) { | |
| if (num === 0 || num === 1) { | |
| return 1; | |
| } | |
| else { | |
| var d = FirstFactorial(num - 1); | |
| return num * d; | |
| } | |
| } |
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
| const sorted = [4,78,6,-8].sort((a,b) => a - b); | |
| console.log(sorted); |
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 | |
| header("Content-Type: application/json; charset=UTF-8"); | |
| $data = json_decode(file_get_contents('php://input'), true); | |
| //print_r($data); | |
| foreach($data as $key => $value) | |
| { | |
| $str.=$key.":".$value."\n"; | |
| } | |
| $file = 'people.txt'; | |
| // Open the file to get existing content |
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 axios from 'axios'; | |
| axios.interceptors.request.use(request => { | |
| console.log(request); | |
| return request; | |
| }, error => { | |
| console.log(error); | |
| return Promise.reject(error); | |
| }); |
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
| .DrawerToggle { | |
| width: 40px; | |
| height: 100%; | |
| display: flex; | |
| flex-flow: column; | |
| justify-content: space-around; | |
| align-items: center; | |
| padding: 10px 0; | |
| box-sizing: border-box; | |
| cursor: pointer; |
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
| add_filter('the_content', 'do_shortcode'); |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Pure JS sider</title> | |
| <link rel="stylesheet" href="pjs.css"> | |
| <script src="pjs.js"></script> | |
| </head> |
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
| $ sudo a2enmod rewrite | |
| sudo nano /etc/apache2/apache2.conf | |
| <Directory /var/www/> | |
| Options Indexes FollowSymLinks | |
| AllowOverride All | |
| </Directory> | |
| # service apache2 restart |