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
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace", | |
"editor.fontSize": 16, | |
"editor.fontLigatures": true, | |
"editor.showFoldingControls": "always", | |
"editor.folding": true, | |
// "editor.foldingStrategy": "indentation", |
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
[user] | |
email = contato@eufelipe.com | |
name = Felipe Rosas | |
signingKey = | |
[commit] | |
gpgSign = true | |
[tag] | |
gpgSign = true |
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
// title | |
<?php wp_title(''); ?><?php if (wp_title('', false)) { echo ' : '; } ?><?php bloginfo('name'); ?> | |
// Url Dir | |
<link href="<?php echo get_template_directory_uri(); ?>/fonts/css/fontello.css" rel="stylesheet"> | |
// Menu by Name | |
<?php wp_nav_menu(array('menu' => 'sidebar-menu', 'menu_class' => '')); ?> |
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
alias c="clear" | |
alias l="ls -lah" | |
alias laravel-clean="php artisan cache:clear;php artisan config:clear;composer dump-autoload" | |
alias emulador="/Users/eufelipe/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_23" | |
export PATH="/Users/eufelipe/Library/Android/sdk/platform-tools":$PATH | |
export ANDROID_HOME=/Users/eufelipe/Library/Android/sdk | |
# GIT |
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 void createShortCut() { | |
try { | |
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); | |
SharedPreferences.Editor editor = sp.edit(); | |
Boolean isAppInstalled = sp.getBoolean(App.mGlobalContext, Constants.IS_APP_INSTALLED); | |
if (isAppInstalled) { | |
return; | |
} |
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
/** | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
*/ | |
public static boolean isNetworkAvailable(Context context) { | |
boolean isConnected = false; | |
try { |
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 final class DataBinder { | |
private DataBinder() { | |
} | |
@BindingAdapter("android:src") | |
public static void setImageUrl(final ImageView imageView, String url) { | |
Context context = imageView.getContext(); |
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 com.squareup.okhttp.Callback; | |
import com.squareup.okhttp.MultipartBuilder; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.RequestBody; | |
import com.squareup.okhttp.Response; | |
*/ | |
OkHttpClient client = new OkHttpClient(); |
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 com.squareup.okhttp.Callback; | |
import com.squareup.okhttp.MultipartBuilder; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.RequestBody; | |
import com.squareup.okhttp.Response; | |
*/ | |
OkHttpClient client = new OkHttpClient(); |
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
private boolean checkPlayServices() { | |
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance(); | |
int resultCode = apiAvailability.isGooglePlayServicesAvailable(this); | |
if (resultCode != ConnectionResult.SUCCESS) { | |
if (apiAvailability.isUserResolvableError(resultCode)) { | |
apiAvailability.getErrorDialog(this, resultCode, | |
PLAY_SERVICES_RESOLUTION_REQUEST).show(); | |
} else { | |
Log.i(LOG_TAG, "This device is not supported."); | |
finish(); |