Skip to content

Instantly share code, notes, and snippets.

View mervick's full-sized avatar

Andrey Izman mervick

View GitHub Profile
@mervick
mervick / Baidu Maps API
Created September 9, 2021 07:17 — forked from jackyliang/Baidu Maps API
Baidu Maps API
Baidu Maps API Detailed Explanation
-
Explanation of [drawing Objects onto Baidu Maps](http://developer.baidu.com/map/jsdemo.htm#f0_7).
Draw Shit Onto Baidu Map:
-
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@mervick
mervick / README.md
Created September 8, 2021 06:31 — forked from Unibozu/README.md
Shutter - Linux - dropbox automatic screenshot url to clipboard

Shutter - Dropbox automatic screenshot URL to Clipboard

Installation

  1. Configure shutter to save your screenshot directly intoyour dropbox public folder.
  2. Place dropbox-puburl.sh in the location of your choice (here ~/tools/bin/dropbox-puburl.sh)
  3. Place dropbox-screenshot-puburl.desktop into /usr/share/applications (you need to be root)
  4. Eventually update the path to your Bash script
  5. exec sudo update-desktop-database
  6. Quit and restart shutter. Go into Preferences &gt; Actions &gt; Open With and select Dropbox copy public file URL to clipboard
@mervick
mervick / caret.js
Created December 21, 2020 19:57 — forked from islishude/caret.js
get/set caret position in contentEditable or textarea/input element(JavaScript)
/**
* @file get/set caret position and insert text
* @author islishude
* @license MIT
*/
export class Caret {
/**
* get/set caret position
* @param {HTMLColletion} target
*/
@mervick
mervick / eslint-plugin.js
Last active December 20, 2020 06:33
Modified JetBrains eslint-plugin for PhpStorm 2017 with support Eslint 6 and Eslint 7
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
@mervick
mervick / google_text2speech.md
Created December 16, 2020 21:45 — forked from alotaiba/google_text2speech.md
Google Text to Speech API

Google Text to Speech API

Base URL: http://translate.google.com/translate_tts
It converts written words into audio. It accepts GET requests.

GET

q
The query string to convert to audio

tl
Translation language, for example, ar for Arabic, or en-us for English

@mervick
mervick / rwas.py
Created December 7, 2020 00:03 — forked from erickdsama/rwas.py
Class to read and write messages to Whatsapp through of the ADB. You need a android Device with Sqlite3 installed and ADB service.
# coding=utf-8
import json
import time
from subprocess import check_output, CalledProcessError
class WHO:
FROM_ME = "key_from_me == 1"
OTHERS = "key_from_me != 1"
ALL = ""
@mervick
mervick / gist:02de55c224dbe7c02cdaeae37269e0dd
Created November 16, 2020 23:27 — forked from krcourville/gist:7309218
Navigate table with arrow keys using jQuery
$('table.arrow-nav').keydown(function(e){
var $table = $(this);
var $active = $('input:focus,select:focus',$table);
var $next = null;
var focusableQuery = 'input:visible,select:visible,textarea:visible';
var position = parseInt( $active.closest('td').index()) + 1;
console.log('position :',position);
switch(e.keyCode){
case 37: // <Left>
$next = $active.parent('td').prev().find(focusableQuery);
@mervick
mervick / transparent_window.py
Created July 7, 2020 01:21 — forked from KurtJacobson/transparent_window.py
Transparent Window in Gtk+ 3, python
#!/usr/bin/env python
# Copyright (c) 2017 Kurt Jacobson
# License: https://kcj.mit-license.org/@2017
import cairo
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
@mervick
mervick / aaa_catalina_vm_virtualbox_install.md
Created June 2, 2020 02:14
Catalina VM VirtualBox Install

Catalina VirtualBox Setup

Setting up macOS/OSX Catalina for VirtualBox enabling 256MB of VRAM.

Install

Using the myspaghetti macos-guest-virtualbox github repo.

git clone git@github.com:myspaghetti/macos-guest-virtualbox.git

cd macos-guest-virtualbox

/**
* @author mrdoob / http://mrdoob.com/
* @author supereggbert / http://www.paulbrunt.co.uk/
* @author julianwa / https://github.com/julianwa
*/
THREE.RenderableObject = function () {
this.id = 0;