Skip to content

Instantly share code, notes, and snippets.

View ahmadaghazadeh's full-sized avatar
🏢
Working from Office

Ahmad Aghazadeh ahmadaghazadeh

🏢
Working from Office
View GitHub Profile
@PatrykGala
PatrykGala / LogstashAndroid.java
Last active November 30, 2022 01:19
Add logstash logging for Android App
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
//Logging
LoggerFactory.getLogger(MainActivity.class).warn("Hello");
//Add optional fields in onCreate method (in Activity or Application):
MDC.put("version_android", Build.VERSION.RELEASE);
@ahmadaghazadeh
ahmadaghazadeh / ImageGallery.cshtml
Created October 10, 2016 04:22
MVC image gallery
@foreach (var item in resPacks)
{
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-6" width="150" height="150">
@item.NAME
@Html.Image(item._id.ToString(), item.DATA, $"class=\"img-responsive\" alt=\"{item._id.ToString()}\" ")
</div>
}
adb shell input text 'This text'
gradlew -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8580
@ozh
ozh / gist:4131243
Created November 22, 2012 13:44
Create dot files/directories (ie .file) on Windows

#How to create a .file or .folder on Windows

There are several ways

1. Rename

  • Create file.txt
  • Rename to .file., the last dot will be dropped, you'll have .file

Works the same with a file or a directory.