Skip to content

Instantly share code, notes, and snippets.

View maximillian2's full-sized avatar

Maksym Tymoshyk maximillian2

  • EPAM Systems
  • Kyiv, Ukraine
  • 10:27 (UTC +03:00)
View GitHub Profile
@maximillian2
maximillian2 / multiple_ssh_setting.md
Created May 10, 2022 21:27 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@maximillian2
maximillian2 / youtube-dl-download-pluralsight.md
Created December 2, 2018 06:41 — forked from munim/youtube-dl-download-pluralsight.md
youtube-dl to download pluralsight videos

Download Plural Sight videos

Software required:

youtube-dl

After installation and putting the youtube-dl in PATH

youtube-dl \
@maximillian2
maximillian2 / gist:d0044dc255826e1f1609df4045540c91
Created September 8, 2018 06:40
Uninstall XQuartz.app from OSX Yosemite/El Capitan/Sierra
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist && \
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist && \
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz && \
sudo pkgutil --forget org.macosforge.xquartz.pkg && \
rm -rf ~/.serverauth* && rm -rf ~/.Xauthorit* && rm -rf ~/.cache && rm -rf ~/.rnd && \
rm -rf ~/Library/Caches/org.macosforge.xquartz.X11 && rm -rf ~/Library/Logs/X11
@maximillian2
maximillian2 / gist:63b1e45dd34020234dcd25fcdeccd5b6
Created January 5, 2018 13:12 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@maximillian2
maximillian2 / refresh-spotlight-index.sh
Created July 26, 2017 20:02 — forked from ismnoiet/refresh-spotlight-index.sh
Refresh spotlight index to list the newly installed applications
# pboblem : some applications can't be found using spotlight search box.
# solution : reload the metadata plist
# source : http://apple.stackexchange.com/questions/62715/applications-dont-show-up-in-spotlight
# Turn off spotlight
sudo mdutil -a -i off
# Unload it :
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
package nau.algorhythms;
import javax.sound.sampled.Line;
/**
*
* Created by maxi on 25.01.16.
*/
public class StringLinkedList {
@maximillian2
maximillian2 / Main.java
Created January 26, 2016 21:56
First level of laboratory.
// 1 LEVEL
int stackLength = 10;
IntegerStack stack = new IntegerStack(stackLength);
// expecting true
out.println("Stack emptiness: " + stack.isEmpty());
// populating
for (int i = 0; i < stackLength; i++)
stack.push(i + 1);
@maximillian2
maximillian2 / IntegerStack.java
Created January 26, 2016 21:56
Stack realization on integer numbers.
package nau.algorhythms;
/**
* Created by maxi on 25.01.16.
*/
public class IntegerStack {
private int[] array;
private byte headPosition;
namespace Restaurant
{
public static class FileManager
{
public static void SerializeCollectionToFile<T>(List<T> collection, string fileName)
{
new SharpSerializer ().Serialize (collection, fileName);
}
public static List<T> DeserializeCollectionFromFile<T> (string fileName)
@maximillian2
maximillian2 / 0_reuse_code.js
Created October 23, 2015 19:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console