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
import android.graphics.* | |
import com.squareup.picasso.Transformation | |
// https://gist.github.com/codezjx/b8a99374385a0210edb9192bced516a3 | |
class CircleTransformation: Transformation { | |
companion object { | |
private val KEY = "circleImageTransformation" | |
} | |
override fun transform(source: Bitmap): Bitmap { |
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
// List with required permissions | |
private val REQUIRED_SDK_PERMISSIONS = arrayOf(Manifest.permission.ACCESS_FINE_LOCATION) | |
private fun checkPermissions() { | |
val missingPermissions = ArrayList<String>() | |
// check all required dynamic permissions | |
for (permission in REQUIRED_SDK_PERMISSIONS) { | |
val result = ContextCompat.checkSelfPermission(this, permission) | |
if (result != PackageManager.PERMISSION_GRANTED) { | |
missingPermissions.add(permission) |
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
Android developers resources | |
Getting started in Android development | |
Android developers | |
- official website https://developer.android.com/ | |
- Codelabs https://codelabs.developers.google.com/ | |
- Youtube https://www.youtube.com/user/androiddevelopers | |
Kotlin | |
- https://kotlinlang.org/ |
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
function openTab() { | |
var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue(); | |
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>"; | |
var userInterface = HtmlService.createHtmlOutput(html); | |
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab'); | |
} |
People
![]() :bowtie: |
π :smile: |
π :laughing: |
---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
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
# A quick and dirty PowerShell script to search for a particular MAC address on Windows DHCP servers across all scopes. | |
$dhcpServers = @("dhcp-server-01","dhcp-server-02") # Define your servers here | |
$results = @() | |
$clientId = Read-Host -Prompt "Input the MAC address you want to search for" | |
foreach ($dhcpServer in $dhcpServers) { | |
Write-Host "Searching $dhcpServer..." | |
Get-DhcpServerv4Scope -ComputerName $dhcpServer | ForEach-Object { | |
$results += Get-DhcpServerv4Reservation -ComputerName $dhcpServer -ScopeId $_.ScopeId -ClientId $clientId -ErrorAction SilentlyContinue |