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
#!/bin/sh | |
wget https://nodejs.org/dist/v5.1.0/node-v5.1.0-linux-x64.tar.gz | |
tar -xvf node-v5.1.0-linux-x64.tar.gz | |
sudo mkdir -p /opt/node | |
sudo mv node-v5.1.0-linux-x64/* /opt/node/ | |
sudo update-alternatives --install "/usr/bin/node" "node" "/opt/node/bin/node" 1 | |
sudo update-alternatives --install "/usr/bin/npm" "npm" "/opt/node/bin/npm" 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
#!/bin/sh | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jre-8u66-linux-x64.tar.gz | |
tar -xvf jre-8u66-linux-x64.tar.gz | |
sudo mkdir -p /opt/jre | |
sudo mv jre1.8.0_66/* /opt/jre/ | |
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jre/bin/java" 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
MaterialUp.getPosts(context, page, MaterialUp.SORT.POPULAR, new MaterialUpCallback() { // use MaterialUp.SORT.LATEST for latest posts | |
@Override | |
public void onSuccess(List <Post> posts, Response response) { | |
// do stuff with posts! | |
} | |
@Override | |
public void onFailure(Request request, IOException e) { | |
// show a toast! |
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
Call<List<Track>> call = Soundroid.getSoundcloudService().searchTracksByGenres("House", 20); | |
call.enqueue(new Callback<List<Track>>() { | |
@Override | |
public void onResponse(Response<List<Track>> response, Retrofit retrofit){ | |
if (response.isSuccess()) { | |
tracks.addAll(response.body()); | |
songAdapter.notifyDataSetChanged(); | |
} | |
} |