Skip to content

Instantly share code, notes, and snippets.

View genorchiomento's full-sized avatar
💻
Work hard

Genor Chiomento genorchiomento

💻
Work hard
View GitHub Profile
@dhiegoabrantes
dhiegoabrantes / MainActivity.java
Last active August 1, 2018 14:19
Device Connection Available
private void carregarFilmes() {
Context context = MainActivity.this;
//Se há conexão disponível
if (NetworkUtil.isNetworkConnected(context)) {
//Aqui fazemos a chamada ao servico responsavel por carregar os filmes de acordo com as preferencias do usuario
} else {
//Se não há conexão disponível, exibe a mensagem
View view = getActivity().findViewById(R.id.activity_main);
Snackbar snackbar = Snackbar.make(view, getString(R.string.no_internet_connection), Snackbar.LENGTH_LONG);
@emotality
emotality / duplicate_line_xcode.md
Last active April 6, 2024 04:23
Xcode - Duplicate Line key binding

NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:

New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)


Xcode line duplicate

Bind keys to duplicate lines in Xcode

@vitorbritto
vitorbritto / rm_mysql.md
Last active April 23, 2024 14:21
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql