- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
- HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall
View product-code-registry-locations.md
View winget-file-hash.ps1
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
winget hash --file <path-to-file> |
View nginx-reverse-proxy-example
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
server { | |
listen 80; | |
listen [::]:80 ipv6only=on; | |
server_name example.com www.example.com; | |
access_log /var/log/nginx/server.access.log; | |
error_log /var/log/nginx/server.error.log; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
View gateway-example.ingress.yaml
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
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
annotations: | |
nginx.ingress.kubernetes.io/configuration-snippet: | | |
if ($http_env = "dev") { proxy_pass http://<service-name>.<service-namespace>.svc.cluster.local:<service-port>; } # Point directly to a service in the same cluster | |
if ($http_env = "staging") { proxy_pass https://staging.example.com; } # Or point to a URL | |
name: gateway | |
namespace: default | |
# Continue as usual pointing to the default service |
View setFieldToIdTimestamp.js
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
db.collection.updateMany({}, [{ $set: { createdAt: { $toDate: "$_id" } } }]) |
View AndroidRequestedPermissions.java
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
List<ApplicationInfo> packages = getPackageManager().getInstalledApplications(PackageManager.GET_META_DATA); | |
for (ApplicationInfo applicationInfo : packages) { | |
try { | |
PackageInfo packageInfo = getPackageManager().getPackageInfo(applicationInfo.packageName, PackageManager.GET_PERMISSIONS); | |
// Get all requested permissions for the current for loop package | |
String[] requestedPermissions = packageInfo.requestedPermissions; | |
// It's also possible to get if a permission has been granted to the current for loop package. |
View compareBackgroundWithResourceId.java
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
// Comparing to a color | |
if (Objects.equals(view.getBackground().getConstantState(), activity.getResources().getDrawable(R.color.anyColor).getConstantState())) { | |
// Do what you have to do... | |
} | |
// Comparing to a drawable | |
if (Objects.equals(view.getBackground().getConstantState(), activity.getResources().getDrawable(R.drawable.anyDrawable).getConstantState())) { | |
// Do what you have to do... | |
} |
View NamesSpecialCharacters.md
- Akan:
- Nyankómàgó
- Mǎnu
- Meńsã́
- Nsĩã́
- Dúkũ
- Ɔkwán
- Nyamékyε
- Obím̀pέ
View addBlankSpaceAfterLastItem.java
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
// This code is inside the recycler view adapter class | |
@Override | |
public void onBindViewHolder(final ViewHolder holder, int position) { | |
if (position + 1 == getItemCount()) { | |
// It is the last item of the list | |
// Set bottom margin to 72dp | |
setBottomMargin(holder.itemView, (int) (72 * Resources.getSystem().getDisplayMetrics().density)); | |
} else { | |
// Reset bottom margin back to zero |
View dateAfterMillis.java
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
/** | |
* Returns a {@link Date} corresponding to the given Date plus time passed in milliseconds. | |
* | |
* @param startingDate The base Date used to get the future Date. | |
* @param timePassed The time (in milliseconds) to be added to the <b>startingDate</b> | |
* @return The {@link Date} in the future after <b>timePassed</b> milliseconds from <b>startingDate</b>. | |
*/ | |
public Date dateAfterMillis(Date startingDate, long timePassed) { | |
Date endingDate = new Date(); | |
endingDate.setTime(startingDate.getTime() + timePassed); |
NewerOlder