Skip to content

Instantly share code, notes, and snippets.

@peterbjorn
peterbjorn / git_push_error_multiple_upstream.sh
Created March 13, 2024 17:45
Fix for git error: fatal: The current branch main has multiple upstream branches, refusing to push.
git config remote.origin.push HEAD
@Nakilon
Nakilon / ubuntu.txt
Last active December 6, 2024 03:50
ubuntu
if configured openssh during installation with 'ubuntu' user:
edit dev:~/.ssh/config and then: ssh ubuntu@...
$ sudo useradd nakilon
$ adduser nakilon sudo
$ echo "nakilon ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/dont-prompt-nakilon-for-sudo-password && chmod 440 /etc/sudoers.d/dont-prompt-nakilon-for-sudo-password
$ mkdir -p /home/nakilon/.ssh
$ sudo cp ~/.ssh/authorized_keys /home/nakilon/.ssh/
$ sudo chmod 700 /home/nakilon/.ssh
$ sudo chmod 600 /home/nakilon/.ssh/authorized_keys
$ sudo chown -R nakilon:nakilon /home/nakilon

Зашквар / Shaming

Здесь я собираю подноготную из мира политики.

Содержание

  1. Закрытый телеграм-канал 4chan
  2. Максим Кац: см. murzilka.io.
  3. Стас Ай, Как Просто! спросил у Андрея Сербанта почему в Яндексе так много людей, которые не любят путинскую Россию. См. твит Шепелина.
  4. В Avito около 06.04.2023 пользователи заметили, что на сайте появилась возможность вставлять в объявления ролики с платформы Rutube.
@justaguywhocodes
justaguywhocodes / mac.sh
Created February 18, 2022 19:27
mac os script
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
defaults write NSGlobalDomain AppleLanguages -array "en" "us"
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD"
defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches"
defaults write NSGlobalDomain AppleMetricUnits -bool false
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
@lbvf50mobile
lbvf50mobile / ruby_sources.md
Last active August 8, 2021 01:08
Материалы по Ruby.

Материалы по Ruby.

В этом документе коротко собраны ключевые материалы по языку Ruby позволяющие быстро научиться использовать основные преимущества этого языка.

@lbvf50mobile
lbvf50mobile / make_four.rb
Last active July 29, 2021 11:45
Question by @Nakilon from 29.07.2021 Thursday.
# Question by @Nakilon from 29.07.2021 Thursday.
puts "Make an array four times bigger!"
def make_four(array)
array.map!{|x| x + x}
(0...array.size).each do |i|
array.push(array[i])
end
end

hi, and goodbye

The past few weeks has not been fun on IRC, the drama based on false information and assumptions has been insane. I've almost entirely been silent on the drama because I know the fallout that would happen if I spoke up.

A quick TLDR - I'm quitting all IRC development. KiwiIRC project lead, IRCv3 technical board, supporting the multitude of IRC networks, the lot.

Many people seem to think that I am supporting one side in everything that is going on, so just to be clear: I am not supporting any side of the current freenode drama - there is so much false information going around from everywhere that it is impossible to support anybody.

Woo freenode drama

@glubsy
glubsy / howto_record_youtube_livestreams.md
Last active May 30, 2025 10:09
How to properly record Youtube & Twitch live streams

How to record Youtube live streams:

  • use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)

  • use ytarchive which basically does the same thing, except a bit better.

  • use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).

  • or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.

@diegopacheco
diegopacheco / pbpaste-pbcopy-ubuntu.md
Last active June 19, 2025 04:33
pbpaste && pbcopy for Ubuntu Linux 20.04

Install

sudo apt-get install xclip -y

Create Alias

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

Try out