Skip to content

Instantly share code, notes, and snippets.

View yogggoy's full-sized avatar
🚀

Erdni M yogggoy

🚀
View GitHub Profile
@yogggoy
yogggoy / stepik_samples.cpp
Last active April 22, 2021 18:16
примеры для решения задач stepik
void strcat(char *to, const char *from)
{
while (*to){
to++;
}
while (*from){
*to = *from;
from++;
to++;
// 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"
@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>

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 / 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
@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 / __ Python tricks .txt
Last active August 15, 2023 03:17
Python hacks
little tricks on python::::::
@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 / 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 / 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: