Skip to content

Instantly share code, notes, and snippets.

#!/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
<!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.
/*!
* 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
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.
// 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
*
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.
-- ==============
-- Update with limit
-- ==============
drop table if exists customer;
drop table if exists supplier;
create table customer (
id int not null AUTO_INCREMENT,
# 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
@indera-shsp
indera-shsp / capture.js
Created August 24, 2018 15:37 — forked from majodev/capture.js
Capture screenshots (png) from multiple sites with phantomjs
// 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",