// API End-Point
http://www.one-tab.com/api/createPage
// POST Payload
{
"key": "483e6ba2-08d6-4cb4-b167-550856f4d7c0",
"tabGroups": [{
"id": "aek6X7rnpxWCtUjcfcKTtw",
"tabsMeta": [{
View onetab-create-page-api.md
View SimpleAPI.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View final-waveform.js
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
import React, { Component } from 'react'; | |
import WaveSurfer from 'wavesurfer.js'; | |
import { WaveformContianer, Wave, PlayButton } from './Waveform.styled'; | |
class Waveform extends Component { | |
state = { | |
playing: false, | |
}; |
View index.html
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> | |
<title>Leaflet</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script> | |
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script> | |
</head> | |
<body> |
View wave.js
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
// https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ | |
function buildWaveHeader(opts) { | |
var numFrames = opts.numFrames; | |
var numChannels = opts.numChannels || 2; | |
var sampleRate = opts.sampleRate || 44100; | |
var bytesPerSample = opts.bytesPerSample || 2; | |
var blockAlign = numChannels * bytesPerSample; | |
var byteRate = sampleRate * blockAlign; | |
var dataSize = numFrames * blockAlign; |
View bluetooth raspberry-pi
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
sudo apt-get update | |
sudo apt-get install python-pip python-dev ipython | |
sudo apt-get install bluetooth libbluetooth-dev | |
sudo pip install pybluez |
View findSnapPoints.ts
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
interface TLBoundsWithCenter { | |
minX: number | |
midX: number | |
maxX: number | |
minY: number | |
midY: number | |
maxY: number | |
width: number | |
height: number | |
} |
View Convert Persian & English digits together
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
String.prototype.toPersianDigits = function () { | |
var id = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']; | |
return this.replace(/[0-9]/g, function (w) { | |
return id[+w]; | |
}); | |
}; | |
String.prototype.toEnglishDigits = function () { | |
var id = { '۰': '0', '۱': '1', '۲': '2', '۳': '3', '۴': '4', '۵': '5', '۶': '6', '۷': '7', '۸': '8', '۹': '9' }; |
View 1info.md
JSON Path with Alpine.js CSP build in Postman Visualizer
Query JSON Response with JSON Path
To work more easily with Postman JSON results, I implemented JSONPath in a Postman Visualizer, to query the results.
JSONPath is to JSON what XPath is to XML, and it helps to dig into large nested objects and get what you are looking for faster.
First I was using just a jQuery version that can be found in the examples and that worked just fine. (JSONpath Visualizer | Postman Team Collections | Postman API Network)
View install-php5.6-ubuntu.sh
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
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install php5.6 | |
php --version | |
sudo apt-get install php5.6-curl php5.6-xml | |
sudo apt-get install composer |
OlderNewer