Skip to content

Instantly share code, notes, and snippets.

@gjaya79
gjaya79 / api-documentation.md
Last active March 17, 2017 10:33
ADDO API Specification

Headers

{
  "Content-Type": "application/json"  ,
  "Accept": "application/json",
  "Api-Version": "",
  "Access-Token": "",
  "App-Version": "",
 "Device-Platform": "iphone" or "android"
@gjaya79
gjaya79 / restart-bluetooth.sh
Created October 9, 2016 12:42
Resart Bluetooth in Mac OS X/macOS
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@gjaya79
gjaya79 / config.json
Created March 28, 2016 21:48 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#3394ff",
"@brand-success": "#5cb85c",
@gjaya79
gjaya79 / google_speech2text.md
Created February 24, 2016 18:47 — forked from alotaiba/google_speech2text.md
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

@gjaya79
gjaya79 / gist:79f45cba37371d8b8a67
Last active August 29, 2015 14:03
MYSQL SPECIAL QUERY
Show the database sizes:
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
Show table sizes
SELECT TABLE_NAME "Table Name", (data_length + index_length) / 1024 / 1024 "Table Size in MB", TABLE_ROWS "Number of row(s)"
FROM information_schema.TABLES where TABLE_SCHEMA='';
Delete rows which are 180 days older;
{"center-label":[{"text":"2 Alerts!","style":{"fill":"#e15400","text-decoration":"underline","font-weight":"bold","line-height":"18px","font-size":"16px"}},{"text":"BTC / USD 484.51","style":{"line-height":"26px","font-size":"16px"}},{"text":"PAST 24 HOURS","style":{"line-height":"16px"}},{"text":"5.2 TH 4.2 BTC","style":{"line-height":"20px","font-size":"20px"}},{"text":"Current Difficulty 6978842649.59","style":{"line-height":"16px"}},{"text":"Next +14.84 5 d, 9 h, 40 m\n","style":{}},{"text":"Network Hashrate ","style":{"line-height":"16px"}},{"text":"27.78 GH/s","style":{}}],"name":"krasiyan123's SuperWidget","children":[{"fill":"#10a0f6","center-label":[{"text":"Eligius HF 650 x 2@eligius","style":{"line-height":"22px","font-size":"20px"}},{"text":"Pool HR:","style":{"line-height":"24px"}},{"text":"1,497.00","style":{"line-height":"24px","font-size":"22px"}},{"text":"Est 24hr BTC Earnings:","style":{"line-height":"24px"}},{"text":"0.00","style":{"line-height":"24px","font-size":"22px"}}],"name":"Eligius
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
sudo locale-gen en_US.UTF-8
To Fix warning: setlocale: LC_CTYPE: cannot change locale (UTF-8) issue add the following line into ~/.bash_profile
export LC_CTYPE="en_US.UTF-8"