Skip to content

Instantly share code, notes, and snippets.

🏠
Working

Ivan Terekhin JEuler

🏠
Working
Block or report user

Report or block JEuler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@n-belokopytov
n-belokopytov / copyDeps.gradle
Last active Aug 10, 2019
Gradle script that generates a task to copy all build variant's dependencies to a certain directory for use with Nexus IQ Server. It copies exploded AARs too, renaming the classes.jar file into "<aar_dependency_name>.jar".
View copyDeps.gradle
apply plugin: 'com.android.application'
android.applicationVariants.all { variant ->
task "copyDependencies${variant.name.capitalize()}"() {
outputs.upToDateWhen { false }
doLast {
println "Executing copyDependencies${variant.name.capitalize()}"
variant.getCompileClasspath().each { fileDependency ->
def sourcePath = fileDependency.absolutePath
def destinationPath = project.projectDir.path + "/build/dependencies/${variant.name}/"
@JagieChen
JagieChen / gist:f5cc44bf663f3722bd19097be47ccf9b
Last active Jul 24, 2019
let Android Activity's transition animation like iOS navigationController's push-pop one
View gist:f5cc44bf663f3722bd19097be47ccf9b
1.Override CommonActivity's startActivity and finish
@Override
public void startActivity(Intent intent) {
super.startActivity(intent);
overridePendingTransition(R.anim.from_right_in, R.anim.from_left_out);
}
@Override
public void finish() {
super.finish();
@iamstuartwilson
iamstuartwilson / slack-file-killer.js
Last active Aug 8, 2018
Kill multiple slack files from your browser console. Simply paste this code when on the "https://[space].slack.com/files/[me]" page.
View slack-file-killer.js
(function(){
$('#files_list > [data-file-id]').each(function(i) {
killIt($(this).attr('data-file-id'));
function killIt(id) {
console.log(id);
$.post('/api/files.delete', {
file: id,
token: boot_data.api_token
@riggaroo
riggaroo / RestServiceMockUtils.java
Last active Mar 14, 2019
Mocking API Responses using a Retrofit Client in Android
View RestServiceMockUtils.java
public class RestServiceMockUtils {
public static String convertStreamToString(InputStream is) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line).append("\n");
}
reader.close();
@j796160836
j796160836 / ShowDebugKeyFingerprints.sh
Created Jan 5, 2015
Show android debug key's fingerprints. (MD5 / SHA1 / SHA256)
View ShowDebugKeyFingerprints.sh
#!/bin/bash
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
@gabrielemariotti
gabrielemariotti / MainActivity.java
Last active Jul 25, 2019
How to obtain a CardView (support library) with a Image and rounded corners for API<21
View MainActivity.java
ImageView imageView = (ImageView) findViewById(R.id.card_thumbnail_image);
Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.rose);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
//Default
imageView.setBackgroundResource(R.drawable.rose);
} else {
//RoundCorners
RoundCornersDrawable round = new RoundCornersDrawable(mBitmap,
getResources().getDimension(R.dimen.cardview_default_radius), 0); //or your custom radius
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active Aug 19, 2019
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel10k

Powerlevel10k

@wolfeidau
wolfeidau / sass_converter.rb
Created May 7, 2011
Sass plugin for Jekyll
View sass_converter.rb
module Jekyll
# Sass plugin to convert .scss to .css
#
# Note: This is configured to use the new css like syntax available in sass.
require 'sass'
class SassConverter < Converter
safe true
priority :low
def matches(ext)
You can’t perform that action at this time.