This example demonstrate how to remap D3 events. MouseWheel event is used to pan the chart in x and y directions. This example was created as an answer to this SO question (Refer to it for detailed explanation).
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
// http://stackoverflow.com/questions/15829172/stop-chrome-back-forward-two-finger-swipe | |
$(document).on('mousewheel', function(e) { | |
var $target = $(e.target).closest('.scrollable-h'); | |
if ($target.scrollLeft () <= 4) { | |
$target.scrollLeft(5); | |
return false; | |
} | |
}); | |
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
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone [email protected]:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync [email protected]:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
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
/*! | |
* | |
* NEW VERSION AT https://github.com/c-kick/mobileConsole | |
* | |
* hnl.mobileConsole - javascript mobile console - v1.3.8 - 04/01/2021 | |
* Adds html console to webpage. Especially useful for debugging JS on mobile devices. | |
* Supports 'log', 'trace', 'info', 'warn', 'error', 'group', 'groupEnd', 'table', 'assert', 'clear' | |
* Inspired by code by Jakub Fiala (https://gist.github.com/jakubfiala/8fe3461ab6508f46003d) | |
* Licensed under the MIT license | |
* |
- 180+ cognitive biases, codified and categorized by Buster Benson: Cognitive bias cheat sheet
- printed poster version: now available from Design Hacks
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
// Add a request interceptor | |
axios.interceptors.request.use(function (config) { | |
// Do something before request is sent | |
return config; | |
}, function (error) { | |
// Do something with request error | |
return Promise.reject(error); | |
}); | |
// Add a response interceptor |
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 time | |
import datetime | |
from utils import * | |
import pyzk.pyzk as pyzk | |
from pyzk.zkmodules.defs import * | |
from pyzk.misc import * | |
""" | |
Script to connect to multiple ZKTeco devices and check the incoming events by pooling. |
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 sys | |
import gi | |
gi.require_version('Gst', '1.0') | |
gi.require_version('GstNet', '1.0') | |
from gi.repository import Gst, GstNet | |
ptp_domain = 0 | |
ptp_interfaces = ['enp0s25'] |
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 re | |
from subprocess import CalledProcessError, check_output as echo | |
from sys import platform | |
from socket import gethostbyaddr | |
# Config | |
IGNORE_BROADCAST = True | |
LOOKUP_HOSTNAMES = True | |
def get_host(ip): |
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 sys | |
import gi | |
gi.require_version('Gst', '1.0') | |
gi.require_version('GstNet', '1.0') | |
from gi.repository import Gst, GstNet, GObject, GLib | |
Gst.init([]) | |
mainloop = GLib.MainLoop() |
OlderNewer