Skip to content

Instantly share code, notes, and snippets.

View mhsattarian's full-sized avatar
🎯
Focusing

Mohammad H. Sattarian mhsattarian

🎯
Focusing
View GitHub Profile
// API End-Point
http://www.one-tab.com/api/createPage

// POST Payload
{
  "key": "483e6ba2-08d6-4cb4-b167-550856f4d7c0",
  "tabGroups": [{
    "id": "aek6X7rnpxWCtUjcfcKTtw",
 "tabsMeta": [{
@psychemedia
psychemedia / SimpleAPI.ipynb
Created September 6, 2017 16:27
Demo of a simple API defining Jupyter notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import React, { Component } from 'react';
import WaveSurfer from 'wavesurfer.js';
import { WaveformContianer, Wave, PlayButton } from './Waveform.styled';
class Waveform extends Component {
state = {
playing: false,
};
@crofty
crofty / index.html
Last active October 22, 2021 08:24
A example of using Google Map tiles with the Leaflet mapping library - http://matchingnotes.com/using-google-map-tiles-with-leaflet
<!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>
@lexruee
lexruee / bluetooth raspberry-pi
Created January 22, 2015 05:12
install bluetooth and pybluez
sudo apt-get update
sudo apt-get install python-pip python-dev ipython
sudo apt-get install bluetooth libbluetooth-dev
sudo pip install pybluez
@marcus-at-localhost
marcus-at-localhost / 1info.md
Last active October 30, 2022 10:40
[JSON Path with Alpine CSP build in Postman Visualizer] Query JSON Response with JSON Path

JSON Path with Alpine.js CSP build in Postman Visualizer

Query JSON Response with JSON Path

2022-04-30_13-58-39_2

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)

@BMeu
BMeu / raspbian-python3.5.rst
Created October 12, 2016 19:16
Installing Python 3.5 on Raspbian

Installing Python 3.5 on Raspbian

As of October 2016, Raspbian does not yet include the latest Python release, Python 3.5. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).

@gachiemchiep
gachiemchiep / main.py
Created August 16, 2018 02:26
Write/Read image data on Redis using opencv or PIL
import redis
import cv2
import numpy as np
import time
import io
from PIL import Image
r = redis.StrictRedis.from_url('redis://:password@127.0.0.1:6379/1')
img_path ="image"
@steveruizok
steveruizok / findSnapPoints.ts
Last active June 23, 2023 01:50
Find the snap points between a bounding box and several other bounding boxes.
interface TLBoundsWithCenter {
minX: number
midX: number
maxX: number
minY: number
midY: number
maxY: number
width: number
height: number
}
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6
#Composer
sudo apt-get install curl php5-cli git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer