Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.
For more information see square/okhttp#967
Usage
| // TODO add <meta-data android:value="GlideModule" android:name="....OkHttpProgressGlideModule" /> | |
| // TODO add <meta-data android:value="GlideModule" tools:node="remove" android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule" /> | |
| // or not use 'okhttp@aar' in Gradle depdendencies | |
| public class OkHttpProgressGlideModule implements GlideModule { | |
| @Override public void applyOptions(Context context, GlideBuilder builder) { } | |
| @Override public void registerComponents(Context context, Glide glide) { | |
| OkHttpClient client = new OkHttpClient(); | |
| client.networkInterceptors().add(createInterceptor(new DispatchingProgressListener())); | |
| glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client)); | |
| } |
| # Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
| # Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
| # run `sudo service procps start` or reboot. | |
| # Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
| # | |
| # More information resources: | |
| # -$ man inotify # manpage | |
| # -$ man sysctl.conf # manpage | |
| # -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
| How to load page-specific JS functions and pass values to those functions when JS is loaded below your views. |
Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.
For more information see square/okhttp#967
Usage
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| #!/bin/bash | |
| IPT="/sbin/iptables" | |
| # Server IP | |
| SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')" | |
| # Your DNS servers you use: cat /etc/resolv.conf | |
| DNS_SERVER="8.8.4.4 8.8.8.8" | |
| # Allow connections to this package servers |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| // Usage: | |
| // blacklist | |
| String[] blacklist = new String[]{"com.any.package", "net.other.package"}; | |
| // your share intent | |
| Intent intent = new Intent(Intent.ACTION_SEND); | |
| intent.setType("text/plain"); | |
| intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
| intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
| // ... anything else you want to add | |
| // invoke custom chooser |
| /** | |
| * Copyright (c) 2013 Xcellent Creations, Inc. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining | |
| * a copy of this software and associated documentation files (the | |
| * "Software"), to deal in the Software without restriction, including | |
| * without limitation the rights to use, copy, modify, merge, publish, | |
| * distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so, subject to | |
| * the following conditions: |