Skip to content

Instantly share code, notes, and snippets.

View neyhart's full-sized avatar

Maksim Borodin neyhart

  • Moscow
View GitHub Profile
@neyhart
neyhart / nl.sh
Created February 8, 2019 17:01 — forked from yyx990803/nl.sh
npm list only top level modules.
alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
@neyhart
neyhart / git-pushing-multiple.rst
Created May 31, 2019 12:56 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@neyhart
neyhart / aliases_centos.md
Created November 1, 2019 11:39 — forked from gdellicarpini/aliases_centos.md
Add permanent aliases in Linux CentOS

Aliases for all users

  • Create a file in /etc/profile.d/ directory

      - myAlias.sh
    
  • Define the alias in the file

      alias gotoserver1="ssh user@192.168.1.100"
    
@neyhart
neyhart / .gitignore
Created April 10, 2021 16:24 — forked from GhostofGoes/.gitignore
Basic .gitignore template for Python projects
# Editors
.vscode/
.idea/
# Vagrant
.vagrant/
# Mac/OSX
.DS_Store
// vscode-keybindings for navigation with I/J/K/L and additional functionality with surrounding characters
// Place your key bindings in this file to overwrite the defaults
// ALT + I/J/K/L: up/left/down/right
// ALT + SHIFT + I/J/K/L: mark text up/left/down/right
// CTRL + J/L: send cursor to start/end of line
// CTRL + ALT + J/L: send cursor to start/end of word
// CTRL + ALT + U/O: send cursor to "wordPartLeft"/"wordPartRight"
// CTRL + ALT + SHIFT + U/O: mark from cursor to "wordPartLeft"/"wordPartRight"
// CTRL + ALT + Y: got to declaration
@neyhart
neyhart / install_pyenv_mac_zsh.rst
Last active August 30, 2021 19:51 — forked from josemarimanio/install_pyenv_mac_zsh.rst
Installing pyenv on macOS for Zsh using Homebrew
@neyhart
neyhart / download-vs-code-server.sh
Last active December 9, 2021 14:24 — forked from b01/download-vs-code-server.sh
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
set -e
# You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases
commit_sha="08a217c4d27a02a5bcde898fd7981bda5b49391b"
archive="vscode-server-linux-x64.tar.gz"
owner='microsoft'
repo='vscode'
# Auto-Get the latest commit sha via command line.
<ul class="flex">
<li class="flex flex-col relative text-center space-y-3">
<div class="bg-blue-100 rounded-lg p-3">COMPANY</div>
<ul class="flex space-x-3">
<li class="flex flex-col relative space-y-3">
<div class="bg-teal-300 rounded-lg p-2">Sales Department</div>
<ul class="flex space-x-3">
<li class="flex flex-col relative">
<div class="bg-teal-300 rounded-lg p-2">Sub Sales A</div>
@neyhart
neyhart / full_export.py
Created October 5, 2022 17:06 — forked from kpostekk/full_export.py
Simple python ffmpeg conversion script. From flac to mp3, aac and opus
import os
aac_cmd = 'ffmpeg -i "{file_name}" -c:a aac -b:a 256k aac/{output_name}.aac'
opus_cmd = 'ffmpeg -i "{file_name}" -c:a libopus -b:a 96k ./opus/{output_name}.opus'
mp3_cmd = 'ffmpeg -i "{file_name}" -c:a mp3 -b:a 128k ./mp3/{output_name}.mp3'
for d in ('mp3', 'opus', 'aac'):
os.mkdir(d)
counter = 1
@neyhart
neyhart / cue_to_flac.py
Created October 5, 2022 17:54 — forked from Theldus/cue_to_flac.py
CUE splitter using ffmpeg (to flac)
cue_file = 'file.cue'
d = open(cue_file).read().splitlines()
general = {}
tracks = []
current_file = None