Skip to content

Instantly share code, notes, and snippets.

View wavecos's full-sized avatar

Jose Alfredo Arias S. wavecos

View GitHub Profile
@wavecos
wavecos / change_uuid_vbox.md
Last active May 25, 2023 21:18
Change to new UUID for VHD file in Oracle Virtualbox #virtualbox #windows #uuid #vhd

Cambiar a un nuevo UUID para un archivo VHD con Virtualbox

En Powershell con permisos de administrador

.\VBoxManage.exe internalcommands sethduuid D:\UtilityTalent\Doepker\win2019_server_alt.vhd

Este comando se encuentra ubicado en:

@wavecos
wavecos / tag_log.kt
Created March 21, 2023 21:53
TAG definition for Android Log #android #log #logger #TAG
private val TAG = MyClass::class.qualifiedName
@wavecos
wavecos / dismiss_keyboard_android.md
Last active March 21, 2023 14:07
Dismiss keyboard when touch outside #android #dismiss #keyboard #compose

Dismiss keyboard in Android

reference

val localFocusManager = LocalFocusManager.current

...
@wavecos
wavecos / oracle-docker.sh
Last active February 14, 2021 23:24
Oracle Docker Container #oracle #docker
docker pull store/oracle/database-enterprise:12.2.0.1
@wavecos
wavecos / multiuser-brew.md
Last active February 15, 2021 01:45
#ios #brew

Multiuser brew

Create a group called brew and add users

sudo chgrp -R brew /opt/homebrew-cask/Caskroom
sudo chmod -R g+w /opt/homebrew-cask/Caskroom

Remove Title for all UIBarButtonItem (NavigationBar)

  func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
...
    // UI Setup
    let barAppearace = UIBarButtonItem.appearance()
    barAppearace.setBackButtonTitlePositionAdjustment(UIOffsetMake(0, -60), forBarMetrics:UIBarMetrics.Default)
...
 return true

Dynamic UITableViewCell height

  1. Use auto layout
  2. Set this:
    self.tableView.rowHeight = UITableViewAutomaticDimension
    self.tableView.estimatedRowHeight = 120 // Any referencial height
    <changeSet id="20161231000001" author="jhipster">

        <sql>SET FOREIGN_KEY_CHECKS=0;</sql>

        <loadData encoding="UTF-8"
                  file="config/liquibase/enterprises.csv"
                  separator="|"
                  tableName="enterprise">
 
@wavecos
wavecos / git_tips.md
Last active November 3, 2021 23:43
#git

Git Rebase

Into source branch run dev (creo):

git fetch origin  && git fetch origin --prune && git rebase origin/dev

into destination branch: DEXX

git rebase -i dev
public class DetailActivity extends AppCompatActivity implements MediaPlayer.OnPreparedListener
...
private MediaPlayer mediaPlayer;
...
// Setup MediaPlayer
mediaPlayer = new MediaPlayer();
mediaPlayer.setOnPreparedListener(this);
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
try {
mediaPlayer.setDataSource(REPLACE_WITH_SOME_URL_RESOURCE);