Just some learning resources to stick around with Dagger2.
This file contains 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 java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.net.URL; | |
public class ResourceHelper { | |
public String convertFileToString(File file) throws Exception { | |
BufferedReader reader = new BufferedReader(new FileReader(file)); | |
StringBuilder sb = new StringBuilder(); |
- download from oficial page
- extract
tar -xzvf p4v.tgz
- copy the extracted P4Merge download to /opt/p4merge
sudo mv * /opt/p4merge
- symlink p4merge
sudo ln -s /opt/p4merge/bin/p4merge /usr/local/bin/p4merge
- edit ~/.gitconfig with:
[merge]
keepBackup = false;
tool = p4merge
This file contains 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
# edit .bashrc | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# with colors | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ " | |
# reload .bashrc |
This file contains 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
CREATE TABLE ARTICA.GANADORES_PREMIO_GAMIFICACION ( | |
ID_AUT_USUARIO BIGINT NOT NULL, | |
IDENTIFICADOR VARCHAR(255), | |
FECHA TIMESTAMP, | |
EMAIL VARCHAR(255) | |
); | |
-- TRIGGER 100 POINTS GAMIFICATION | |
CREATE TRIGGER FULL_POINTS_GAMIFICATION | |
AFTER UPDATE ON AUT_USUARIO |
This file contains 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
echo "Welcome Alex" | |
export PS1=">> " | |
alias hi="history" |
This file contains 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
<bean id="tokenStore" class="org.springframework.security.oauth2.provider.token.JdbcTokenStore"> | |
<constructor-arg ref="dataSource" /> | |
</bean> | |
<bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.DefaultTokenServices"> | |
<property name="tokenStore" ref="tokenStore" /> | |
</bean> |
This file contains 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 FragmentTestActivity extends Activity { | |
/** | |
* Used for "what" parameter to handler messages | |
*/ | |
final static int MSG_WHAT = ('F' << 16) + ('T' << 8) + 'A'; | |
final static int MSG_SHOW_DIALOG = 1; | |
int value = 1; |
This file contains 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
My way is to remove OpenJDK, add the webupd8team's PPA and install 64-bit java8 as a packet. | |
Code: | |
sudo apt-get purge openjdk* | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer |