Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Edge Functions Setup Script
# Run this in any project directory to add edge function deployment
# add this to your .bashrc or .zshrc:
# alias setup-edge-functions='bash <(curl -fsSL https://gist.githubusercontent.com/BlackMac/3e0f889b1578a81f62bd08cbf0ba3c43/raw/setup-edge-functions.sh)'
set -e
PROJECT_NAME=${1:-$(basename "$(pwd)")}
[
{
"title":"AI - HN",
"url":"https://hnrss.org/newest?q=ai+OR+llm+OR+OpenAI"
}
]
055200070
const http = require("https")
const querystring = require('querystring');
var tokens = []
var jsonfile = require('jsonfile')
function getin(payload) {
var data ={}
if (payload) {
if (! payload.page_no) {
jsonfile.writeFile("out.json", tokens)
0408fe714e7631efcf55fb046080cd2fc692eb36f0e18c851b94e2d9bbeca63895c9c9893e24649ef5f5f441a326757938a70d43537a5cdafd8ceb82336744aaeb;jmatty1983
<script src="https://phone.sipgate.com/static/js/webphone.js"></script>
<div id='sipgate-webphone-container' style="height: 550px; width: 400px;"></div>
<script>
var webphone = new SipgateWebphone();
webphone.init({
container: document.getElementById('sipgate-webphone-container'),
clientId: 'CLIENT_ID'
});
</script>
@BlackMac
BlackMac / README.md
Last active April 26, 2017 10:57
Verify a phone number using the SMS sending capabilities of the sipgate REST API.

SMS phone number verification

Use the sipgate REST-API to verify if a mobile phone number is valid.

To try this just type

mkdir smsauth
cd smsauth
curl -O "https://gist.githubusercontent.com/BlackMac/0d16c4564e785cdad9b9624e6dac4f2c/raw/verify_number.php"
@BlackMac
BlackMac / sipgate.html
Last active February 22, 2016 21:53 — forked from anonymous/sipgate.html
Inject sipgate.js into a website
<script charset="utf-8" src="https://sipgatesocket.herokuapp.com/static/sipgate.min.js"></script>
<script charset="utf-8">
new Sipgate.io.live("{{uuid}}");
</script>
@BlackMac
BlackMac / sipgatesocket.html
Last active December 3, 2015 19:29
fastest way to include sipgate in Web projects
<script charset="utf-8" src="https://cdn.socket.io/socket.io-1.3.7.js" />
<script charset="utf-8" src="https://sipgatesocket.herokuapp.com/sipgateio.min.js" />
<script charset="utf-8">
var test = new SipgateIO("ENTER UUID HERE", {
all: function(data) {
console.log(data);
}
});
</script>
@BlackMac
BlackMac / iotest.css
Last active August 29, 2015 14:21
CSS for the sipgate.io meteor tutorial
/* CSS declarations go here */
body {
font-family: "Helvetica Neue";
font-weight: 200;
padding:0;
margin:0;
}
h1 {
margin:0;