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
| /* | |
| * Copyright © 2015-2016. by ceph3us | |
| * All Rights Reserved. | |
| * www.ceph3us.pl | |
| */ | |
| package pl.ceph3us.android.examples; | |
| import android.app.Activity; | |
| import android.os.Bundle; |
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
| /** | |
| * Copyright 2013 Omar Miatello - [email protected] | |
| * Based on http://stackoverflow.com/a/18000094/1228545 | |
| * | |
| * 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 | |
| * |
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
| public class ScrollViewWithMaxHeight extends ScrollView { | |
| public static int WITHOUT_MAX_HEIGHT_VALUE = -1; | |
| private int maxHeight = WITHOUT_MAX_HEIGHT_VALUE; | |
| public ScrollViewWithMaxHeight(Context context) { | |
| super(context); | |
| } |
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
| private ListView mListView; | |
| private MoPubAdAdapter mAdAdapter; | |
| private RequestParameters myRequestParameters; | |
| private static final String MY_AD_UNIT_ID = "myAdUnitId"; | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| // Set up your adapter as usual. | |
| Adapter myAdapter; |
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
| replaceInManifest = {variant, fromString, toString -> | |
| def flavor = variant.productFlavors.get(0) | |
| def buildtype = variant.buildType | |
| def manifestFile = "$buildDir/manifests/${flavor.name}/${buildtype.name}/AndroidManifest.xml" | |
| def updatedContent = new File(manifestFile).getText('UTF-8').replaceAll(fromString, toString) | |
| new File(manifestFile).write(updatedContent, 'UTF-8') | |
| } |
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 | |
| # This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use | |
| # Then it'll pass whatever commands to that specific device or emulator. | |
| # Run adb devices once, in event adb hasn't been started yet | |
| BLAH=$(adb devices) | |
| # Grab the IDs of all the connected devices / emulators | |
| IDS=($(adb devices | sed '1,1d' | sed '$d' | cut -f 1 | sort)) |
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
| # http://www.linux4beginners.info/node/increase-max-connections-mysql-without-restart | |
| select @@max_connections; | |
| set global max_connections = 200; | |
| select @@max_connections; |
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
| # cat /etc/logrotate.d/mysqld | |
| # This logname can be set in /etc/my.cnf | |
| # by setting the variable "err-log" | |
| # in the [safe_mysqld] section as follows: | |
| # | |
| # [safe_mysqld] | |
| # err-log=/var/log/mysqld.log | |
| # | |
| # If the root user has a password you have to create a |
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
| repositories { mavenCentral() } | |
| configurations { sshAntTask } | |
| dependencies { sshAntTask 'org.apache.ant:ant-jsch:1.9.2' } | |
| ant.taskdef( | |
| name: 'scp', | |
| classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', | |
| classpath: configurations.sshAntTask.asPath) |
OlderNewer