This file contains hidden or 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
// Believe it or not, Microsoft has this documented: | |
// http://msdn.microsoft.com/en-us/library/bb259689.aspx | |
function toBing(x, y, zoom) { | |
var x2 = pad(String(x.toString(2)), zoom + 1) | |
, y2 = pad(String(y.toString(2)), zoom + 1) | |
, quadkey = '' | |
; | |
function pad(n, p) { |
This file contains hidden or 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
// ==UserScript== | |
// @name SafariBooks synatx hightlihgt | |
// @description Enable syntax highlighting when viewing code in safari books online | |
// @version 1 | |
// @require https://unpkg.com/@highlightjs/[email protected]/highlight.min.js | |
// @resource syntaxHighlightCSS https://unpkg.com/@highlightjs/[email protected]/styles/github.min.css | |
// @match https://learning.oreilly.com/*/* | |
// @grant GM_addStyle | |
// @grant GM_getResourceText | |
// ==/UserScript== |
This file contains hidden or 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
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
This file contains hidden or 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
Raspberry: | |
sudo apt-get install gstreamer1.0 | |
raspivid -t 0 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=0.0.0.0 port=5000 | |
Mac: | |
gst-launch-1.0 -v tcpclientsrc host=192.168.1.8 port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false | |
Very fast: |
This file contains hidden or 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
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android |
This file contains hidden or 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
FTDI chip and OS X 10.10 | |
Hi All, | |
Yesterday I got a FTDI (UART to USB) board from unknown manufacturer. I plugged in to the iMac and without a surprise, it was not working. I have tried all the possible combinations, but no luck. Then after some digging in Apple documentation and Google about kext, FTDI and related, I finally made it. Here are the steps: | |
1. In order to disable the AppleUSBFTDI.kext extension (From Mac OS X 10.8 there is Apple driver implementation for the FTDI chip). | |
cd /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns | |
sudo mv AppleUSBFTDI.kext AppleUSBFTDI.disabled | |
2. Downloading and installing FTDI VCP Driver. I used the Mac OS X, 64 bit version. |