Skip to content

Instantly share code, notes, and snippets.

View troyane's full-sized avatar
🛠️
Build and deploy!

Nazar troyane

🛠️
Build and deploy!
View GitHub Profile
@troyane
troyane / .gitignore
Created May 3, 2022 19:25
Obsidian.md example of gitignore file
# to exclude Obsidian's settings (including plugin and hotkey configurations)
.obsidian/
# Add below lines to exclude OS settings and caches
.trash/
.DS_Store
@troyane
troyane / mp42gif.sh
Last active March 8, 2024 21:08
See script and documentation here: https://github.com/troyane/StackOverflow-pro/tree/master/mp42gif Script to convert MP4 file to GIF (via ffmpeg). It creates intermediate custom color palette out of input video file and use it for resulting GIF for better picture quality. For more info see https://superuser.com/a/556031
#!/bin/bash
#
# Script to convert MP4 video to GIF with generation of custom color palette.
#
#=== Do not touch code below
# Inner variables
input_file=""
input_fps="20"
input_height="512"
@troyane
troyane / trine-bin
Created February 28, 2019 06:32
Run Trine 1 on Linux with dual screen. Turns off one screen to avoid picture stretching. Turns on screen as soon as you exit the game.
#!/bin/bash
# Do some magic here
echo "Turn OFF Laptop screen"
xrandr --output eDP-1-1 --off
if [ `uname -m` == x86_64 ] ; then
./trine-bin64 $*
else
@troyane
troyane / install_soft.sh
Last active February 8, 2019 11:52
Script to install additional 3rd party software on newly installed Linux.
# Install soft via APT
sudo apt install build-essential
# Install libreoffice via ppa
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt install audacious automake ccache cmake doublecmd-qt gimp git guake hplip-gui lm-sensors mc mednafen meld nmap pax-utils python3-minimal rar redshift remmina rsync screen sed simple-scan tio vlc wget zip kate inkscape ktorrent pidgin retext torbrowser-launcher libreoffice
@troyane
troyane / hk.c
Created June 3, 2016 14:39 — forked from tobin/hk.c
Hoshen-Kopelman algorithm for cluster labeling
/* Tobin Fricke's implementation of the
Hoshen-Kopelman algorithm for
cluster labeling.
Copyright (c) September 9, 2000, by Tobin Fricke <tobin@pas.rochester.edu>
Modified 2002-03-09 Tobin Fricke
Modified substantially 2004-04-21 by Tobin Fricke
This program is written in the 1999 standard of the C language (C99). Older C
@troyane
troyane / Git Configs
Created January 9, 2016 10:47 — forked from tacsio/Git Configs
My git config
git config --global user.name "Tarcisio Coutinho"
git config --global user.email "tcs5cin@gmail.com"
git config --global color.ui true
git config --global alias.s status
git config --global alias.c checkout
git config --global alias.b branch
git config --global alias.lol log --oneline --graph --decorate
@troyane
troyane / skills.md
Last active January 5, 2016 19:11 — forked from skalinets/skills.md
Ранги в IT
Позиція Функції
Intern Дізнається про компанію
Junior developer Вчиться працювати
Middle developer Працює
Senior developer Вчиться не працювати
Software Architect Не працює
Solution Architect Вчиться заважати працювати
CTO (Chief technical officer) Заважає працювати
@troyane
troyane / main.cpp
Last active November 6, 2015 20:12
C++ example of passing arguments as references
#include <iostream>
using namespace std;
struct Container {
int value;
explicit Container(const int i) : value(i) {
cout << "\nCreated Container per typical c-tor.\n";
}
@troyane
troyane / svg2png_diff_pdi
Created September 25, 2014 12:46
Batch converter from svg to png with different DPI + preparing part of file to add to
# Autrhor Nazar `tro` Gerasymchuk
#!/bin/bash
dpis=(90 135 180 270 360 540)
for dir in ${dpis[@]}
do
mkdir ${dir}
done
@troyane
troyane / SNER_preparer
Last active February 1, 2023 21:53
Script to prepare Stanford NER to work with your Python and NLTK
#!/bin/bash
mkdir my_project
cd my_project
echo " . . . Downloading file stanford-ner-2014-08-27.zip"
# NOTE: need to update link for further versions
wget http://nlp.stanford.edu/software/stanford-ner-2014-08-27.zip
echo " . . . Unpacking stanford-ner-2014-08-27.zip"