Skip to content

Instantly share code, notes, and snippets.

View yogggoy's full-sized avatar
🚀

Erdni M yogggoy

🚀
View GitHub Profile
@yogggoy
yogggoy / git_cherry_pik.md
Last active December 14, 2024 09:18
git cherry-pick

http://paratapok.ru/developer-tools/2593_kak-v-git-perenesti-commit-iz-odnoj-vetki-v-druguyu/

  1. Смотрим историю изменений и запоминаем хэш коммита <hash-commit-0>, соответствующего правильному состоянию ветки master, то есть когда ещё в неё не было добавлено лишних коммитов по ошибке.

  2. Также следует запомнить хэш коммита <hash-commit-1>, который был лишним в ветке master. Иногда бывает, что лишними оказываются сразу несколько коммитов, тогда если они расположены последовательно друг за другом следует запомнить самый давний <hash-commit-begin> и самый последний <hash-commit-end>.

  3. Перейдём на найденный коммит <hash-commit-0>. Другими словами переходим на то состояние ветки master, от которого нам нужно создать новую ветку.

@yogggoy
yogggoy / A_tips.md
Last active February 19, 2021 11:27
linux tips

SSH

close ssh connections on server

hard mode :

pkill -U USER_NAME

soft mode:

@yogggoy
yogggoy / check_vnc.sh
Created June 25, 2018 11:10
vncserver/vncviewer fast access
#!/bin/sh
#check_vnc.sh - save on server at home
ps -ef | grep Xvnc | grep $USER | grep --color -P "Xvnc :[0-9]+"
@yogggoy
yogggoy / .gitconfig
Last active February 23, 2024 16:53
configs
[user]
name =
email =
[alias]
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
[core]
editor = vim
@yogggoy
yogggoy / __ Python tricks .txt
Last active August 15, 2023 03:17
Python hacks
little tricks on python::::::
@yogggoy
yogggoy / 51-usbblaster.rules
Last active August 17, 2018 17:25
Altera USB-blaster rules linux driverr
# path - /etc/udev/rules.d/51-usbblaster.rules
# USB-Blaster
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666"
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6002", MODE="0666"
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6003", MODE="0666"
# USB-Blaster II
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6010", MODE="0666"
@yogggoy
yogggoy / ubuntu_pakages.txt
Last active March 17, 2020 17:21
list of packages must be install on fresh Ubuntu
fresh Ubuntu:
after install:
apt-get update
apt-get upgrade
installed pkgs:
this is not bash script, just very similar:
sudo apt-get install -y

terminal color preset

.bashrc file:

PS1="\[\e[4m\e[01;42m\]\u@\h\[\e[01;33m\]::\W$\[\e[00m\]
eval "`dircolors -b $HOME/.lscolors`"
@yogggoy
yogggoy / FreeJoy_g27_shifter.conf
Created September 27, 2020 17:29
config file FreeJoyConfigurator for debug
<?xml version="1.0"?>
<DeviceConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Firmware_Version>5667</Firmware_Version>
<Device_Name>FreeJoy&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;</Device_Name>
<Button_Debounce_Time>50</Button_Debounce_Time>
<A2b_Debounce_Time>50</A2b_Debounce_Time>
<Encoder_Press_Time>10</Encoder_Press_Time>
<Button_Timer1_Time>50</Button_Timer1_Time>
<Button_Timer2_Time>200</Button_Timer2_Time>
<Button_Timer3_Time>300</Button_Timer3_Time>
// just X_O game, writed for fun
// g++ -std=gnu++11 just_play.cpp; ./a.out
#include <iostream>
#include <string>
#define BB 4
// 0 - " "
// 1 - "X"
// 2 - "0"