# Install AVD files
yes | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-29;default;x86'
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
# Create emulator
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_29_AOSP -d pixel --package 'system-images;android-29;default;x86' --force
$ANDROID_HOME/emulator/emulator -list-avds
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
/* On a real device it is not possible to simply call driver.get("url"), doing so will open SIRI and query with "url" resulting in a search. | |
Instead we can take advantage of Safari's launch parameters and pass deep link URL as argument. | |
Below is an example: */ | |
String deepLinkURL = "deeplink://"; | |
driver.executeScript("mobile: terminateApp", ImmutableMap.of("bundleId", "com.apple.mobilesafari")); | |
List args = new ArrayList(); |
For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):
-
List All System Images Available for Download:
sdkmanager --list | grep system-images
-
Download Image:
sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"
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
/** | |
* General utilities to wait for ports and URL responses to be available. | |
* Especially useful when waiting for container services to be fully "up". | |
*/ | |
public class WaitFor { | |
private static final Logger logger = LoggerFactory.getLogger(WaitFor.class.getClass()); | |
public static void waitForPort(String hostname, int port, long timeoutMs) { | |
logger.info("Waiting for port " + port); |
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
clear-host; | |
#Remove-Variable * -ErrorAction SilentlyContinue | |
#get-item Variable:* | |
#Get-Variable | Select-Object -ExpandProperty Name | |
. C:\Users\linda_l\Desktop\PowerShell\GoogleOauth.ps1 | |
Add-Type -Path "C:\Users\linda_l\Documents\visual studio 2015\Projects\TestingLibrary\packages\AE.Net.Mail.1.7.10.0\lib\net45\AE.Net.Mail.dll" | |
Add-Type -AssemblyName System.IO | |
Add-Type -AssemblyName System.Text.Encoding |
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
$targDir = "C:\inetpub\websites\ADA*\"; | |
$subDir = $(Get-ChildItem "$targDir"); | |
foreach($sub in $subDir) { | |
$files = $(Get-Childitem $sub -Filter app_offline*.htm); | |
foreach($file in $files) { | |
$oldname = $file.FullName; |
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
$targDir = "C:\dev\LMS-client-ADA"; | |
Get-ChildItem $targDir -Filter *.pdf | | |
Foreach-Object { | |
$oldname = $_.FullName; | |
$newname = $_.FullName.Replace(" ", "_"); | |
$newname = $newname -replace "[0-9]+\-[0-9]+\-[0-9]+_", ""; | |
Rename-Item $oldname $newname; |
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
license: mit |
This is taken from here. http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git/72156#72156 Want this as a gist because I always come back to this posting.
First, clone a remote git repository and cd into it:
$ git clone git://example.com/myproject
$ cd myproject
Next, look at the local branches in your repository:
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
var nano = require('nano')('http://localhost:5984'); | |
var dbName = 'testdb'; | |
var testDb = nano.use(dbName); | |
nano.db.list(function(error, databases) { | |
if (error) | |
return console.log('ERROR :: nano.db.list - %s', JSON.stringify(error)); | |
if (databases.indexOf(dbName) < 0) { | |
nano.db.create(dbName, function(error, body, headers) { |
NewerOlder