Skip to content

Instantly share code, notes, and snippets.

View vasili4's full-sized avatar
💭
working hard

vasili4

💭
working hard
View GitHub Profile
@vasili4
vasili4 / iterm2-solarized.md
Created August 8, 2019 02:12 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@vasili4
vasili4 / pr.md
Created November 1, 2017 19:03 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

ffmpeg -i TP.mkv -c:s copy -c:v copy -c:a aac TPaac.mkv
#file -s /dev/xvdf
#mkfs -t ext4 /dev/xvdf
#mkdir /solrdata
#mount /dev/xvdf /solrdata
#vim /etc/fstab
#mount -t ext4 block_device /mount/point
lsblk
@vasili4
vasili4 / mp4-join.sh
Last active February 8, 2017 04:49
Join multiple .mp4 files in current folder
#!/bin/bash
if [ -f joined-out.mp4 ]; then
echo "File joined-out.mp4 already exists!"
exit 0
fi
# inspired by http://stackoverflow.com/a/41387530/2780918
[ -e list.txt ] && rm list.txt
#!/bin/bash
sudo chmod -R 000 "/Applications/Symantec Solutions/"
sudo chmod -R 000 "/Library/Application Support/Symantec/"
sudo chmod -R 000 "/Library/LaunchAgents/com.symantec.uiagent.application.plist"
sudo chmod -R 000 /Library/PrivateFrameworks/Sym*
#!/bin/bash
sudo chmod -R 755 "/Applications/Symantec Solutions/"
sudo chmod -R 755 "/Library/Application Support/Symantec/"
sudo chmod -R 755 "/Library/LaunchAgents/com.symantec.uiagent.application.plist"
sudo chmod -R 755 /Library/PrivateFrameworks/Sym*
from sys import version as python_version
import logging
from BaseHTTPServer import HTTPServer
import json
from cgi import parse_header, parse_multipart
if python_version.startswith('3'):
from urllib.parse import parse_qs
from http.server import BaseHTTPRequestHandler
else:
#!/usr/bin/env bash
# ansible all -m script -a "./sshd_alive.sh" --sudo
set -e # exit on error
set -u # exit on undeclared var
set -x # trace
if [ ! -f /tmp/ssh_config.bak ]; then
cp /etc/ssh/sshd_config /tmp/sshd_config.bak
tail /etc/default/grub
echo "GRUB_DISABLE_OS_PROBER=true" >> /etc/default/grub && update-grub && dpkg --configure -a
ansible all -a "apt-get -y update" --sudo
ansible all -a "apt-get -y upgrade" --sudo
ansible all -a "apt-get -y dist-upgrade" --sudo