Skip to content

Instantly share code, notes, and snippets.

View igor47's full-sized avatar

Igor Serebryany igor47

View GitHub Profile
@ioggstream
ioggstream / system-sleep-xhci.sh
Created November 7, 2017 13:08
Disable broken xhci device before suspend and avoid freeze.
#!/bin/sh
#
# This script should prevent the following suspend errors
# which freezes the Dell Inspiron laptop.
#
# Put it in /usr/lib/systemd/system-sleep/xhci.sh
#
# The PCI 00:14.0 device is the usb xhci controller.
#
# kernel: [67445.560610] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
@guiniol
guiniol / aliases.muttrc
Last active March 23, 2024 13:12
neomutt configuration with notmuch
alias YOU YOUR NAME <email@somewhere.com>
@varqox
varqox / install_debian_with_debootstrap_howto.md
Last active May 4, 2024 11:48
Instructions how to install Debian using debootstrap
@harith
harith / shellmarks.sh
Last active September 18, 2022 07:50
Utilities to let you easily reach frequently visited but deeply nested directories.
# Utilities for quickly accessing frequently used directories in bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
#
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@valyagolev
valyagolev / fabfile.py
Created June 2, 2012 20:20
Quick deploy with chef-solo and fabric
# http://unfoldthat.com/2012/06/02/quick-deploy-chef-solo-fabric.html
from fabric.api import settings, run, sudo, reboot, put, cd, env
AWS_ACCESS_KEY = '...'
AWS_SECRET_KEY = '...'
AWS_KEYPAIR_NAME = '...'
AWS_SECURITY_GROUPS = ['default']
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state