Skip to content

Instantly share code, notes, and snippets.

@autovalue
autovalue / unjsfuck.js
Last active January 26, 2023 20:27
JsFuck Unfucker | UnJsFuck | JsFuck decoder | JsFuck deobfuscate
/**
* Based off https://codegolf.stackexchange.com/questions/28714/convert-jsfuck-to-normal-js
**/
var UnJSFuck = {
decode: function(jsFuckCode){
return /\n(.+)/.exec(eval(jsFuckCode.slice(0,-2)))[1];
}
};
@autovalue
autovalue / ConverterCallAdapterFactory.java
Created April 5, 2017 21:31
Retrofit ConverterCallAdapterFactory implementation. A way to use the current request to convert the ResponseBody to a different class type.
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import okhttp3.Request;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.CallAdapter;
@autovalue
autovalue / RxFirebase.java
Created August 20, 2016 21:51 — forked from gsoltis/RxFirebase.java
RxJava Bindings for Firebase
package com.firebase.client;
import com.firebase.client.core.Constants;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
import rx.functions.Func1;
import rx.subscriptions.Subscriptions;
public class RxFirebase {
@autovalue
autovalue / SassMeister-input.scss
Created January 19, 2016 15:15
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
@mixin font-face($font-family, $file-path, $weight: normal, $style: normal) {
@font-face {
font-family: $font-family;
font-weight: $weight;
font-style: $style;
@autovalue
autovalue / Timer.java
Last active January 17, 2016 02:01
Android Java equivalent of JavaScript's console.time function
import android.util.Log;
import java.util.HashMap;
public class Timer {
private static HashMap<String, Long> measurements = new HashMap<>();
private Timer(){}
@autovalue
autovalue / yetanotherworkaroundfortethering.txt
Created December 24, 2015 14:50 — forked from CHEF-KOCH/yetanotherworkaroundfortethering.txt
Fix for older Android 4.x tethering problems
su
settings get global tethering_dun_required
settings get global tether_dun_required
# or
#settings put global tether_dun_required 0
#settings put global tethering_dun_required 0
netcfg
#(now search for the iface) e.g. ccmni0
@autovalue
autovalue / sass-prepend-selector.scss
Created December 17, 2015 15:18
SASS mixin for appending a selector to the parent of the current rule set.
/// Nested [mixin]
/// --------------
/// Prepend a css rule to the current rule set.
/// @content : <content>
/// @param $selector : <span>
/// @param $isParent : <span> Whether the $selector will be applied as a parent or not.
@mixin prepend-selector($selector, $isParent: true) {
@if($isParent) {
@at-root #{$selector} & {
@autovalue
autovalue / SassMeister-input-HTML.html
Created November 20, 2015 13:17
Generated by SassMeister.com.
<div class="gradient vertical-gradient">
test
</div>
<div class="gradient corner-gradient">
test
</div>
@autovalue
autovalue / gist:2c6122d2b9ae9e3c6a31
Last active August 29, 2015 14:26 — forked from liminal/gist:8801401
Using adb over wifi with Android Tether device
# Set up adb to use tcpip port
adb tcpip 5555
# Default device ip when it's used as a portable hotspot
adb connect 192.168.43.1
# List connected devices
adb devices
@autovalue
autovalue / app.yaml
Last active August 29, 2015 14:19 — forked from darktable/app.yaml
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest