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
package my.example.compat; | |
/* | |
* NOTICE: modified since 2023 and later. | |
* | |
* Copyright (C) 2008 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License 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
{ | |
"ad": { | |
"flag": "🇦🇩", | |
"name": "Andorra", | |
"dialCode": "+376" | |
}, | |
"ae": { | |
"flag": "🇦🇪", | |
"name": "United Arab Emirates", | |
"dialCode": "+971" |
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
#!/usr/bin/osascript -l JavaScript | |
// ^^^^ COMMENT/REMOVE THIS SHEBANG IF RUNNING FROM SCRIPT EDITOR!!!!! ^^^^^^^^^^^ | |
// The SHEBANG is only needed if the file is executable and is run from a terminal with `./RsyncBackup.js` | |
// 1. In MacOS Spotlight type 'Script Editor' and paste the code below | |
// 2. Click the top-left dropdown which says 'AppleScript' and select 'JavaScript' | |
// 3. Under menu File pick Export | |
// 4. In the Export dialog select File Format = Application | |
// 5. Save the app in /Applications |
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
#!/usr/bin/env python3 | |
import sys, os, socket | |
from socketserver import ThreadingMixIn | |
from http.server import SimpleHTTPRequestHandler, HTTPServer | |
HOST = socket.gethostname() | |
class ThreadingSimpleServer(ThreadingMixIn, HTTPServer): | |
pass |
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
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
import os | |
# function to take care of downloading file | |
def enable_download_headless(browser,download_dir): | |
browser.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command') | |
params = {'cmd':'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': download_dir}} | |
browser.execute("send_command", params) |
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
cd $HOME | |
FileName='go1.13.4.linux-armv6l.tar.gz' | |
wget https://dl.google.com/go/$FileName | |
sudo tar -C /usr/local -xvf $FileName | |
cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
EOF | |
source ~/.bashrc |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>ACE Editor: submit, beautify and minify</title> | |
<style type="text/css" media="screen"> | |
#ace_js, #ace_css { | |
width: 95%; | |
height: 15em; | |
border: 1px solid silver; |
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
-- | |
-- Created by IntelliJ IDEA. | |
-- User: Juraji | |
-- Date: 25-1-2018 | |
-- Time: 19:51 | |
-- | |
-- Binds to a text source and shows the current time in 24h format | |
-- appended with the current timezone designation. | |
-- The timezone designations for both dst and non-dst can be changed | |
-- by updating the dst_ variables below |
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
<div id="swipezone"> | |
Swipe me | |
</div> | |
// credit: http://www.javascriptkit.com/javatutors/touchevents2.shtml | |
function swipedetect(el, callback){ | |
var touchsurface = el, | |
swipedir, | |
startX, |
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
adb shell dumpsys battery | grep level |
NewerOlder