Skip to content

Instantly share code, notes, and snippets.

Avatar

Dorin Brage nirodg

  • Bratislava
View GitHub Profile
View gears3_fullDumpeMMC.bin.txt
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
37748753 0x2400011 Linux EXT filesystem, rev 1.0, ext4 filesystem data, UUID=28dbe996-15f3-4532-93a3-2b880f220f22
37799955 0x240C813 Linux EXT filesystem, rev 1.0, ext4 filesystem data, UUID=28dbe996-15f3-4532-93a3-2b880f220f22
39191672 0x2560478 Unix path: /opt/usr/media/cred.conf'
39191742 0x25604BE Unix path: /opt/usr/media/cred.conf', error: No such file or directory
39217403 0x25668FB Unix path: /31457280/0/2/14/0/0/0
39230619 0x2569C9B Unix path: /31457280/0/2/14/0/0/0
39243835 0x256D03B Unix path: /31457280/0/2/14/0/0/0
@nirodg
nirodg / Selenide cheat sheet
Created Feb 28, 2020 — forked from mkpythonanywhereblog/Selenide cheat sheet
Selenide cheat sheet to create concise UI tests in Java. What is Selenide? Selenide is a wrapper for Selenium WebDriver. http://selenide.org/
View Selenide cheat sheet
=Navigating=
baseUrl = "http://site.com";
open("/login");
open("http://google.com");
switchTo().frame($("#myFrame").toWebElement());
=Alert=
switchTo().alert().accept();
@nirodg
nirodg / xps_15_9570__dualboot_with_encryption__notes.md
Created Jan 15, 2020 — forked from mdziekon/xps_15_9570__dualboot_with_encryption__notes.md
XPS 15 9570 - DualBoot with Encryption (Windows 10 with BitLocker + Ubuntu 18.04 with LVM on LUKS)
View xps_15_9570__dualboot_with_encryption__notes.md
  • Based on https://askubuntu.com/a/293029/286776
  • Installation date: 15-09-2018
  • Additional notes based on my own experience
  • The process describes a completely fresh installation with a complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled).
  • The process was conducted on Dell's XPS 15 9570 (2018) with specs:
    • CPU: i7-8750H
    • Screen: 4K with Touch
    • RAM: 16 GB (original) / 32 GB (manually upgraded)
    • Drive: 512 GB (SK Hynix PC401)
@nirodg
nirodg / waitingTime.java
Created Dec 18, 2018
Wait for X minutes and seconds then it stops.
View waitingTime.java
int minute = 0, seconds = 30, waitingTime = 2;
Calendar currTime = Calendar.getInstance();
Calendar timeSleep = (Calendar) currTime.clone();
timeSleep.add(Calendar.MINUTE, minute);
timeSleep.add(Calendar.SECOND, seconds);
System.out.println(String.format("Now is %s:%s and I will wait until %s:%s", currTime.get(Calendar.MINUTE), currTime.get(Calendar.SECOND),
timeSleep.get(Calendar.MINUTE), timeSleep.get(Calendar.SECOND)));
@nirodg
nirodg / allValuesMatches.java
Created Nov 28, 2018
Algorithm for checking if all values of an array are the same.
View allValuesMatches.java
public static void main(String[] args) {
int[] age = new int[3];
age[0] = 16;
age[1] = 24;
age[2] = 30;
System.out.println(allValuesMatches(age));
}
@nirodg
nirodg / ArduinoPotentiometerPosition.ino
Created Mar 30, 2018
Potentiometer's degree's position for Arduino
View ArduinoPotentiometerPosition.ino
// author: Dorin Brage
// repo: https://github.com/nirodg
long maxRotPtr = 1023; // Max potentiometr value
long totalDegr = 360; // Max degree
long rotationPtr = 0; // Will be fetch from the A0 input
const int sensorInput = 0;
void setup() {
Serial.begin(9600);
}
@nirodg
nirodg / sortItem.java
Created Mar 25, 2018
Mimic the sortable jquery functionality https://jqueryui.com/sortable/
View sortItem.java
public static <T> List<T> sortItem(List<T> sortList, int moveFrom, int moveTo) {
if (moveFrom == moveTo) {
// do nothing
return null;
}
boolean isLastPosition = (sortList.size() == moveTo + 1);
T currentElement = sortList.get(moveFrom);
@nirodg
nirodg / docker_cleanup.sh
Last active Jun 1, 2017
Docker CleanUp - Removes containers and volumes
View docker_cleanup.sh
#/bin/bash
# Stopping all containers
docker stop $(docker ps -a -q)
# Removing all containers
docker rm $(docker ps -a -q)
# Removing all volumes
docker volume rm `docker volume ls -q -f dangling=true`
@nirodg
nirodg / README-Template.md
Created Feb 19, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You can’t perform that action at this time.