Skip to content

Instantly share code, notes, and snippets.

inotifywait --timefmt %T --format '%T %e %w %f' -m -r --excludei '^(.*)((~\$(.*)\.(doc|xls)(|x))|.*\.tmp)$' -e create -e delete -e modify -e move /srv/data
nsenter -t 28657 -m -u -i -n -p journalctl -xe --no-pager
lxc-attach -n appsrv1 -- bash -il
lxc-ls --running
lxc-start -n app1 -d
lxc-clone src dst
AUO>LGD>BOE
http://en.community.dell.com/support-forums/laptop/f/3519/t/19586281
The system will not function with the Intel GPU disabled - the nVidia GPU is not a true discrete video chip - it is a co-processor. Only the Intel GPU has a connection to the display screen - all video data passes through it on its way to the display, so there is no way to disable it and have a functional system.
Check with the publisher of the game for its recommendations on settings for hybrid video -- not all games will work with a hybrid setup.
There are two ways to implement nVIdia's Optimus technology (and AMD's Catalyst as well). One is with a true hardware multiplexer that allows hardware control of which GPU is active. The other is with a mux-less software-switched design where only the Intel GPU has a physical connection to the display panel. The vast majority of systems are designed this way - as is yours. It's a much more power-efficient way to run the system, but it is also demanding from a software (driver)
Puppet is a "Configuration Management" technology.
Ansible is an "Orchestration" technology.
@mailinglists35
mailinglists35 / ipsec
Created November 2, 2017 15:06
ipsec
https://github.com/hwdsl2/setup-ipsec-vpn
https://github.com/trailofbits/algo
PATH=/u01/app/oracle/product/12.2.0/dbhome_1/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
DATE='date +%Y%m%d'
09 21 * * * /home/oracle/jobs/bkp.sh >> /home/oracle/jobs/log/bkp_$($DATE).log 2>&1
#/home/oracle/jobs/log/bkp_`/usr/bin/date +%Y%m%d`.log 2>&1
#01 20 * * * logger ok
#DATE='date +%Y%m%d'
#07 21 * * * /home/oracle/jobs/bkp.sh >> /home/oracle/jobs/log/bkp_$($DATE).log 2>&1
#* * * * * /usr/bin/env > /home/oracle/cron-env
#* * * * * /bin/echo ok >> /tmp/`date +%Y%m%d` 2>&1
ping 192.168.13.1 >nul: 2>nul:
if %ERRORLEVEL% == 0 goto end
net stop OpenVPNService
net start OpenVPNService
:end
$ sudo apt-get install dkms # if you've already installed dkms, skip this step.
$ sudo cp -R . /usr/src/mt7610u_sta-1.0
$ sudo dkms add mt7610u_sta/1.0
$ sudo dkms build mt7610u_sta/1.0
$ sudo dkms install mt7610u_sta/1.0
dkms.conf
PACKAGE_NAME=mt7610u_sta
PACKAGE_VERSION=1.0
@mailinglists35
mailinglists35 / ffmpeg gps
Last active January 5, 2018 11:23 — forked from oeon/HowToStripAndFlip.md
How to remove GPS EXIF from iPhone .mov video
*say that you left your Location turned on and held your phone upside down. If you want to fix that, try this:*
strip: `ffmpeg -i input.mov -map_metadata -1 -vcodec copy -acodec copy output.mov` via http://askubuntu.com/questions/139570/how-do-i-remove-all-metadata-from-a-quicktime-movie-file (read comments)
flip: `ffmpeg -i in.mov -vf "vflip" out.mov` via http://superuser.com/questions/578321/how-to-flip-a-video-180-vertical-upside-down-with-ffmpeg (then to ffmpeg documentation)
@mailinglists35
mailinglists35 / watch samba
Created April 16, 2018 11:52
watch monitor email samba share modifications
# cat /usr/local/bin/watch_share.sh
#!/bin/bash
pkill -x inotifywait
cat /dev/null > /run/inotify.log
inotifywait --timefmt %T --format '%T %e %w %f' -m -r --excludei '^(.*)((~\$(.*)\.(doc|xls)(|x))|.*\.tmp)$' -e create -e delete -e modify -e move /srv/hostname/date/samba >> /run/inotify.log &
inotifywait --timefmt %T --format '%T %e %w %f' -m -r --excludei '^(.*)((~\$(.*)\.(doc|xls)(|x))|.*\.tmp)$' -e create -e delete -e modify -e move /srv/hostname/volatile/temp >> /run/inotify.log &
tail -f /run/inotify.log | sed -u -e 's/\/srv\/hostname\/date\/samba\//\\\\\\\\deptname\\\\projname\\\\/g' -e 's/\/srv\/hostname\/volatile\/temp\//\\\\\\\\deptname\\\\projname\\\\TEMP\\\\/g' | /usr/local/bin/check_share.sh
# cat /usr/local/bin/check_share.sh
#!/bin/bash
systemctl start vsftpd.service
yum reinstall $(repoquery --requires --recursive --resolve libusb ) --downloadonly --downloaddir=/var/ftp/pub/localrepo
createrepo --update /var/ftp/pub/localrepo
yum install libusb --downloadonly --downloaddir=/var/ftp/pub/localrepo
createrepo --update /var/ftp/pub/localrepo