Skip to content

Instantly share code, notes, and snippets.

View morozov's full-sized avatar

Sergei Morozov morozov

View GitHub Profile
@aadmathijssen
aadmathijssen / pre-commit.sh
Last active July 8, 2021 19:15
phpcs pre-commit hook using the gitstaged filter
#!/bin/bash
#stash all changes except for the staged ones
git stash push --keep-index --include-untracked -m "phpcs pre-commit stash"
#run phpcs on the staged files and store the exit code
vendor/bin/phpcs --filter=gitstaged
result=$?
#restore to the previous configuration
@stek29
stek29 / extract_telegram_macos.ipynb
Last active April 24, 2024 17:38
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@agamm
agamm / showAllResolved.md
Last active February 26, 2024 08:56
Show all resolved comments in a Github Pull Request

Run this in the console:

document.querySelectorAll('span.Details-content--closed').forEach((e)=>{e.click()})

From the creator of: unzip.dev 🚀

@jlblancoc
jlblancoc / Install_gcc7_ubuntu_16.04.md
Last active May 7, 2024 14:57
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial

Run the following in the terminal:

Install the gcc-7 packages:

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gcc, g++ point to the newer version:

@LauLaman
LauLaman / gpg.md
Last active March 7, 2023 14:42
Use GPG to sign commits using git & PHPStorm

1 - install GPG tools : https://gpgtools.org/

2 - Create new key for your github email

3 - Add key to git on your local machine: git config --global user.signingkey YOURKEY

4 - configure git to sign all commits: git config --global commit.gpgsign true

5 - add to the bottom of ~/.gnupg/gpg.conf: (create the file if it not exists)

@romuloctba
romuloctba / readme.md
Last active August 1, 2023 12:03
Install Adobe Photoshop CS6 on Wine (Ubuntu, Elementary OS, Linux Mint)

Step 1. Install the Wine Team Ubuntu PPA

First start by installing Wine btw it's a utility to install windows apps in linux :

open the Terminal and :

   sudo add-apt-repository ppa:ubuntu-wine/ppa     
   sudo apt-get update && sudo apt-get upgrade
   sudo apt-get install wine1.7 winetricks
@seebk
seebk / README.md
Last active April 24, 2024 07:17
Extract embedded certificates and keys from OpenVPN config files

This python script is intended to automate the extraction of embedded certificates and keys from OpenVPN config files.

Unfortunately the GNOME Network-Manager is not able to automatically import OpenVPN config files with embedded certificates and keys. A workaround is to manually extract these and store them in separate files (e.g. see https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/).

Instructions:

  • Make shure all the required packages are installed. For example on Ubuntu and Debian run:

    $ sudo apt-get install python3 network-manager-openvpn-gnome

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@deltheil
deltheil / gist:6037656
Created July 19, 2013 08:38
VLC for iOS: upload via WiFi
curl -# -F file=@"foo.mov" http://192.168.0.38:8888/upload.json >/dev/null
@henriquemoody
henriquemoody / phpunit.bash
Last active May 10, 2023 02:52
PHPUnit Bash Completion. sudo curl -L https://gist.githubusercontent.com/henriquemoody/5014805/raw/phpunit.bash -o /etc/bash_completion.d/phpunit && source /etc/bash_completion.d/phpunit
# Bash-Completion script for PHPUnit
#
# Created by Henrique Moody <henriquemoody@gmail.com>
#
_phpunit()
{
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"