Skip to content

Instantly share code, notes, and snippets.

View dprilutskii's full-sized avatar
🎯
Focusing

Denis Prilutsky dprilutskii

🎯
Focusing
View GitHub Profile
@dprilutskii
dprilutskii / AdbCommands
Created August 2, 2022 17:09 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init
@dprilutskii
dprilutskii / AbstractToggleTableItem.java
Created September 23, 2020 11:22 — forked from jaakkju/AbstractToggleTableItem.java
Changing JavaFX table view row styling with non-visible property using row level property binding.
import javafx.beans.property.SimpleBooleanProperty;
/**
* Simple abstract class that has active boolean property
*
* @author jaakkju
*/
abstract public class AbstractToggleTableItem {
@dprilutskii
dprilutskii / update_rpi.sh
Created May 17, 2020 23:53
Full update Raspberry Pi
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo rpi-update
@dprilutskii
dprilutskii / tizen_ui_0.c
Last active February 25, 2020 13:48
Tizen UI update example.
#include <Elementary.h>
struct progresses
{
Evas_Object *moving;
Evas_Object *status;
};
struct progress_with_value
{
@dprilutskii
dprilutskii / git_help_0.sh
Created September 3, 2019 12:00
To commit non-commit changes in new tree
git stash
git checkout newtree
git stash apply
@dprilutskii
dprilutskii / c_const_pointer_examples.c
Created August 12, 2019 12:42
Const and pointer in C
#include <stdio.h>
typedef int type_t;
int main(void) {
printf("Сhanges after initialization\n");
printf("\ttest 1\n");
const type_t value1 = 7;
const type_t value2 = 10;
@dprilutskii
dprilutskii / rpi_i2c.c
Last active July 18, 2022 08:39
Raspberry Pi example for I2C operations
#include <stdio.h>
#include <stdlib.h>
#include <linux/i2c-dev.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
@dprilutskii
dprilutskii / rpi_spi.c
Created August 11, 2019 00:13
Raspberry Pi example for SPI operations
#include "rpi_spi.h"
#define DEVICE "/dev/spidev0.0"
#define ARRAY_SIZE(a) ( sizeof(a) / sizeof( a[0] ) )
/* Init SPI */
uint8_t PI_SPI_Init(spi_t *spi)
{
spi->fd = open(DEVICE, O_RDWR);
sudo apt-get install ntp
sudo nano /etc/ntp.conf
#add strings:
#server 0.ru.pool.ntp.org
#server 1.ru.pool.ntp.org
#server 2.ru.pool.ntp.org
#server 3.ru.pool.ntp.org
sudo /etc/init.d/ntp restart
sudo dpkg-reconfigure tzdata