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
| # start usb debugging mode | |
| # type adb shell which will open adb console | |
| # pm list packages | |
| # pm uninstall -k --user 0 'packagename' |
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
| let myWindow = window.open('', 'PRINT', 'height=auto,width=auto') | |
| myWindow.document.write(' | |
| <!doctype html> | |
| <head> | |
| <title>My github homepage</title> | |
| </head> | |
| <body> | |
| <h1>Stay tuned.</h1> | |
| </body> | |
| </html> |
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
| $nameParts = explode(' ', $filters['name']); | |
| switch (count($nameParts)) { | |
| case 1: | |
| $qb->andWhere( | |
| $qb->expr()->orX( | |
| $qb->expr()->like( | |
| $alias . '.firstName', | |
| $qb->expr()->literal('%' . $filters['name'] . '%') | |
| ), |
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> | |
| <head> | |
| <title>YouTube Video Pause</title> | |
| <style type="text/css"> | |
| .col-md-8{ | |
| width: 75%; | |
| float:left; | |
| } | |
| .col-md-4{ |
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 fs = require('fs') | |
| const https = require('https') | |
| const app = require('express')() | |
| var privateKey = fs.readFileSync('./privatekey.pem', 'utf8') | |
| var certificate = fs.readFileSync('./certificate.pem', 'utf8') | |
| const credentials = {key: privateKey, cert: certificate} | |
| const httpsServer = https.createServer(credentials, app) |
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>Node JS WebSocket Upload</title> | |
| </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
| server { | |
| root projectDirectory; | |
| # example root /var/www/html/myAwesomeProject/public; | |
| index index.html; | |
| server_name domain_name; | |
| location /chat/socket { | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; |
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>Node JS File Upload</title> | |
| </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
| <?php | |
| $filename = 'filepath.html'; | |
| $path = __DIR__ . '/web/uploads/'; | |
| $download_file = $path . $filename; | |
| if (file_exists($download_file)) { | |
| $extension = explode('.', $filename); | |
| $extension = $extension[count($extension) - 1]; | |
| header('Content-Transfer-Encoding: binary'); | |
| header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($path)) . ' GMT'); | |
| header('Accept-Ranges: bytes'); |
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> | |
| <title>Get Nearest word of cursor</title> | |
| </head> | |
| <body> | |
| <input id="textArea" type="text"/> | |
| <br /> |