Skip to content

Instantly share code, notes, and snippets.

View akeinhell's full-sized avatar
:bowtie:

Алексей Дорохов akeinhell

:bowtie:
  • vsemayki.ru
  • Новосибирск
View GitHub Profile
$('param[name=flashvars]').attr('value').split("&")[2].split("=")[1];
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
ads:adUnitId="@string/admob_publisher_id"
ads:adSize="BANNER"
ads:loadAdOnCreate="false"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"/>
@akeinhell
akeinhell / showNews.java
Created November 27, 2013 17:09
sample JSoup XMLHttpRequest with cookies
Document doc = Jsoup.connect(jurl)
.header("Accept","text/html, */*; q=0.01")
.header("Accept-Encoding","gzip,deflate,sdch")
.header("Accept-Language","ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4")
.header("Connection","keep-alive")
.header("Cookie",cookie)
.header("Host","rivalregions.com")
.header("Referer","http://rivalregions.com/")
.header("User-Agent","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36")
.header("X-Requested-With", "XMLHttpRequest")