Skip to content

Instantly share code, notes, and snippets.

View darkalchemy's full-sized avatar

darkalchemy darkalchemy

  • Atlanta, GA
View GitHub Profile
@darkalchemy
darkalchemy / sql_backup.sh
Created December 5, 2022 16:34
Basic bash script for xtrabackup
#!/usr/bin/env bash
## https://docs.percona.com/percona-xtrabackup/8.0/backup_scenarios/full_backup.html
# This does use zstd compression when storing, so you will need to have that installed in your system
# My datastore is ~64GiB and the backup is ~11GiB
## backup
# time sql_backup.sh backup
# real 2m44.311s
# user 6m57.616s
@darkalchemy
darkalchemy / WinUSBFromLinux.md
Created June 10, 2021 22:10 — forked from kuznero/WinUSBFromLinux.md
How to make Windows 7 USB flash install media from Linux?

How to make Windows 7 USB flash install media from Linux?

StackOverflow

  • Install ms-sys - if it is not in your repositories, get it here. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Grub is installed there!)
  • Check what device your USB media is assigned - here we will assume it is /dev/sdb. Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable:
# cfdisk /dev/sdb
or fdisk /dev/sdb (partition type 7, and bootable flag)
INSERT INTO `categories` (`name`, `ordered`, `parent_id`, `image`) VALUES
('Anime', 100, 0, ''),
('Movies', 200, 0, ''),
('TV', 300, 0, ''),
('Music', 400, 0, ''),
('Apps', 500, 0, ''),
('Games', 600, 0, ''),
('Ebooks', 700, 0, 'cat_ebook.png'),
('720p', 101, 1, 'cat_animes720.png'),
@darkalchemy
darkalchemy / gist:d4c0c6c9d7691dfbedc7328bb677abed
Created April 7, 2018 08:29 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf