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
| #!/usr/bin/env python3 | |
| # This is a helper script for removing DNS records | |
| # @see http://www.dnspython.org/examples.html | |
| # | |
| # Setup: | |
| # pip install invoke dnspython | |
| # Usage: | |
| # inv clean | |
| from invoke import task |
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> | |
| <meta charset="UTF-8"> | |
| <title> Example Tracked page with chatbot</title> | |
| <script type="text/javascript"> | |
| window.onload = function () { | |
| try { |
This file has been truncated, but you can view the full file.
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
| /*! | |
| * Copyright 2018 Plivo Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| def hexlify(val): | |
| """ | |
| Note: | |
| - Without the decode() the builtin `hexlify` return the bytes for | |
| hexadecimal representation of the binary data. | |
| - The returned string is twice as long as the length of data. | |
| :param val: binary | |
| :rtype: string | |
| """ | |
| return binascii.hexlify(val).decode() |
This file has been truncated, but you can view the full file.
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
| // https://beautifier.io/ | |
| // https://cdn.plivo.com/sdk/browser/v2/plivo.min.js | |
| /*! | |
| * Copyright 2018 Plivo Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * |
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 fs = require("fs"); | |
| const { Storage } = require("@google-cloud/storage"); | |
| var gcs = new Storage({ | |
| projectId: "sales-dialer-234315", | |
| keyFilename: "keyfile.json" | |
| }); | |
| // Create a new bucket. |
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
| -- ============== | |
| -- Update with limit | |
| -- ============== | |
| drop table if exists customer; | |
| drop table if exists supplier; | |
| create table customer ( | |
| id int not null AUTO_INCREMENT, |
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
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |
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
| // How to: save as capture.js and run with "phantomjs capture.js" | |
| // Setup by modifying URLS, PAGE_WIDTH AND PAGE_HEIGHT constants! | |
| // Hint: set PAGE_WIDTH or PAGE_HEIGHT to 0 to capture full page! | |
| // modified version of script at http://www.cameronjtinker.com/post/2011/09/26/Take-Screenshot-of-all-HTML-documents-in-a-folder-using-PhantomJS.aspx | |
| var PAGE_WIDTH = 960; | |
| var PAGE_HEIGHT = 640; | |
| var URLS = [ | |
| "http://github.com", |