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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>QR Code Scanner</title> | |
<style> | |
#video { | |
width: 100%; | |
height: auto; | |
} |
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 | |
// Ref : http://php.net/manual/en/function.ftp-put.php | |
$name = "test.txt"; | |
$filename = "/home/mine/Desktop/test.txt"; | |
//-- Code to Transfer File on Server Dt: 06-03-2008 by Aditya Bhatt --// | |
//-- Connection Settings | |
$ftp_server = "server_url_here"; // Address of FTP server. | |
$ftp_user_name = "username_here"; // Username |
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 app = require('express')() | |
const basicAuth = require('express-basic-auth') | |
var staticUserAuth = basicAuth({ | |
users: { | |
'Admin': 'secret1234' | |
}, | |
challenge: true, | |
}) |
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
app.get("/app-proxy", async (req, res) => { | |
// Sorted list of query parameters | |
const q = { | |
path_prefix: req.query['path_prefix'], | |
shop: req.query['shop'], | |
timestamp: req.query['timestamp'], | |
}; | |
const originalQuerystring = Object.keys(q).map(key => key + '=' + q[key]).join(''); | |
const crypto = require('crypto') |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function createCookie(name,value,days) { | |
var expires = ""; | |
if (days) { | |
var date = new Date(); | |
date.setTime(date.getTime() + (days*24*60*60*1000)); |
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
; This is a simple method of maintaining a budget using | |
; double-entry accounting software. | |
; Usually, double-entry accounting keeps track of | |
; assets, liabilities, income, and expenses. However, | |
; income/expense categories are different than budget | |
; categories. For one thing, income/expense categories | |
; continually grow, where budget categories tend to rise | |
; and fall. I decided to replace tracking my income/ | |
; expenses with tracking my budget. |
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 | |
/** | |
* This snippet implements the logic behing https://github.com/philipbrown/signplz , simply to explain the functionality of generating the auth signature | |
* for non-php programmers so that they can authenticate with the API without a problem. | |
**/ | |
$api_key = "key"; | |
$api_sec = "sec"; | |
$url = "http://abc.com/api/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
options rtl8821ae debug=0 disable_watchdog=N fwlps=N swlps=Y swenc=Y ips=N msi=0 |
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
server { | |
listen 80; | |
server_name example.com; | |
root /root/project/public; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Content-Type-Options "nosniff"; | |
index index.php; |
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
jQuery.validator.addMethod("au_phone", function(value, element) { | |
return this.optional(element) || /^(?:\+?(61))? ?(?:\((?=.*\)))?(0?[2-57-8])\)? ?(\d\d(?:[- ](?=\d{3})|(?!\d\d[- ]?\d[- ]))\d\d[- ]?\d[- ]?\d{3})$/.test(value); | |
}, "Invalid phone number"); |
NewerOlder