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
# download http://storage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4 | |
printf 'GET /gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4 HTTP/1.1\r\nHost: storage.googleapis.com\r\nConnection: close\r\n\r\n' | nc storage.googleapis.com 80 | xxd -p | tr -d '\n' | sed 's/.*0d0a0d0a//1'| xxd -p -r > ForBiggerMeltdowns.mp4 |
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
facebook.com##a[href="/reel/?s=ifu_see_more"]:upward(h3 + div > div) |
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 hu.akarnokd.rxjava3.bridge.RxJavaBridge | |
import io.reactivex.rxjava3.core.* | |
import io.reactivex.rxjava3.disposables.Disposable | |
import io.reactivex.Completable as CompletableV2 | |
import io.reactivex.Flowable as FlowableV2 | |
import io.reactivex.Maybe as MaybeV2 | |
import io.reactivex.Observable as ObservableV2 | |
import io.reactivex.Scheduler as SchedulerV2 | |
import io.reactivex.Single as SingleV2 | |
import io.reactivex.disposables.Disposable as DisposableV2 |
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
package com.n7mobile.loterity.network.moshi | |
import com.squareup.moshi.JsonAdapter | |
import com.squareup.moshi.JsonReader | |
import com.squareup.moshi.JsonReader.Token.END_ARRAY | |
import com.squareup.moshi.JsonReader.Token.END_OBJECT | |
import com.squareup.moshi.JsonWriter | |
import org.json.JSONArray | |
import org.json.JSONObject |
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
#!/bin/bash | |
LOCATIONS=$(gssdp-discover -t urn:schemas-sony-com:service:DigitalImaging -n 10 | grep -oh "http.*xml") | |
URLS=() | |
function get_live_view_url_from_xml() { | |
xmlstarlet sel -N x="urn:schemas-upnp-org:device-1-0" -t -v "string(/x:root/x:device/av:X_ScalarWebAPI_DeviceInfo/av:X_ScalarWebAPI_ImagingDevice/av:X_ScalarWebAPI_LiveView_URL)" | |
} | |
for line in $LOCATIONS; do |
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
#!/bin/bash | |
adb devices | { | |
mapfile -s 1 -t DEVICES | |
for d in "${DEVICES[@]}"; do | |
DEV="${d%% *}" | |
if ! [[ -z $DEV ]]; then | |
if [[ $DEV == "????????????" ]]; then | |
echo "Unknown device!" |
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 com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.JsonDeserializationContext; | |
import com.google.gson.JsonDeserializer; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonParseException; | |
import com.google.gson.JsonPrimitive; | |
import java.lang.reflect.Type; |
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
/** | |
* Bi-directional {@link Map}. Provides one-to-one mapping of keys and values. | |
*/ | |
public class BiMap <K,V> implements Map<K,V> { | |
private final HashMap<K,V> mMap = new HashMap<>(); | |
private final HashMap<V,K> mReverseMap = new HashMap<>(); | |
@Override | |
public void clear() { | |
mMap.clear(); |
NewerOlder