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
async function asyncSleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function onSearchClick(event) { | |
event.preventDefault(); | |
const cityNameInput = document.getElementById('city-name'); | |
const cityName = cityNameInput.value; |
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
PackageManager packageManager = getActivity().getPackageManager(); | |
List<ApplicationInfo> applicationInfos = | |
packageManager.getInstalledApplications(PackageManager.GET_META_DATA); | |
Log.e("ConfirmImportantSitesDialogFragment", applicationInfos.toString()); | |
for (ApplicationInfo applicationInfo : applicationInfos) { | |
// Log.e("ConfirmImportantSitesDialogFragment", | |
// "ComponentFactory: " + applicationInfo.appComponentFactory); | |
Log.e("ConfirmImportantSitesDialogFragment", | |
"ClassName: " + applicationInfo.className); | |
Log.e("ConfirmImportantSitesDialogFragment", |
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
// Opens a connection to an IndexedDB database. | |
// | |
// @param [String] name the IDB database name | |
// @return [Promise<IDBDatabase>] a connection to the opened database | |
function OpenDatabase(name) { | |
return new Promise((resolve, reject) => { | |
const request = indexedDB.open(name); | |
request.onsuccess = () => { resolve(request.result); }; | |
request.onerror = () => { reject(request.error); }; | |
}); |
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
sudo mkdir -p /usr/share/fonts/opentype | |
sudo mkdir -p /usr/share/fonts/truetype | |
sudo dnf install -y ipa-gothic-fonts ipa-pgothic-fonts ipa-mincho-fonts ipa-pmincho-fonts | |
sudo mkdir -p /usr/share/fonts/opentype/ipafont-gothic | |
sudo cp /usr/share/fonts/ipa-gothic/ipag.ttf /usr/share/fonts/opentype/ipafont-gothic/ | |
sudo cp /usr/share/fonts/ipa-pgothic/ipagp.ttf /usr/share/fonts/opentype/ipafont-gothic/ | |
sudo mkdir -p /usr/share/fonts/opentype/ipafont-mincho | |
sudo cp /usr/share/fonts/ipa-mincho/ipam.ttf /usr/share/fonts/opentype/ipafont-mincho/ | |
sudo cp /usr/share/fonts/ipa-pmincho/ipamp.ttf /usr/share/fonts/opentype/ipafont-mincho/ |
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
renderer side | |
-> DragMsg_TargetDragLeave (browser -> renderer IPC) | |
---- | |
-> RenderWidget::OnDragTargetDragLeave | |
-> WebFrameWidgetBase::dragTargetDragLeave | |
-> DragController::dragExited | |
on the browser side, the message is sent by RenderWidgetHostImpl::DragTargetDragLeave, which is referenced at |
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
Dear FCC, | |
I have a PhD in Computer Science from MIT and I've spent most of my professional life as a software engineer working on Web technology. I have lived the early years of my life in a Communist country, Romania, so I have some first-person experience with censorship and its impact on people. | |
Net neutrality is essential to healthy competition on the Web. This is not an ideological debate, it is a hard fact following from the many studies that showed minor increases in latency cause a website huge audience losses. | |
The existence of zero-rating deals demonstrates that ISPs will not hesitate to differentiate between sites in return for revenue. Giving them full power to do so will get us stuck with the status quo, which is a local optimum. | |
Imagine that, in the early 2000s, Microsoft and Yahoo could have inked deals with ISPs, to slow down Google and negate its speed advantage. The US economy would have lost the huge productivity boom that came from faster and better Web search, and Google might not hav |
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
Yunmai smart scale (M1301, M1302, M1303) Bluetooth LE protocol notes | |
Commands are written to GATT attribute 0xffe9 of service 0xffe5. Responses come | |
as value change notifications for GATT attribute 0xffe4 of service 0xffe0. These | |
are 16-bit Bluetooth LE UUIDs, so nnnn is 0000nnnn-0000-1000-8000-00805F9B34FB. | |
----- | |
Packet Structure |
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
" Use Vim settings, rather than Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
colorscheme default | |
" Add plugins installed in bundle/ to the runtime path. | |
call pathogen#infect() | |
set tabstop=2 | |
set softtabstop=2 |
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
crypto = require 'crypto' | |
hat = require 'hat' | |
hatRandom32 = -> +hat(32, 10) | |
cryptoRandom32 = -> | |
buffer = crypto.randomBytes(4) | |
buffer.readUInt32LE(0) | |
hatRandom53 = -> +hat(53, 10) | |
cryptoRandom53 = -> |
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
# Happy Birthday dear robots. | |
# | |
# Music: https://www.youtube.com/watch?v=4MpMOWldf1c | |
# Launch code: https://github.com/pwnall/node-sphero-pwn-cli | |
flag $brakeOnEnd :on | |
flag $exclusiveDrive :on | |
flag $markerOnEnd :on | |
flag $stopOnDisconnect :on |
NewerOlder