This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/prepress -sOutputFile=compressed.pdf $1 | |
| # largest printer / prepress | |
| # mid-size ebook | |
| # smallest screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lin = @(x) x; | |
| sqr = @(x) x.^2; | |
| cub = @(x) x.^3; | |
| x = -pi/2:pi/1000:pi/2; | |
| y1 = atan(lin(tan(x))); | |
| y2 = atan(sqr(tan(x))); | |
| y3 = atan(cub(tan(x))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # whenever you use "scp", use "copy" instead, it ignores duplicate files. | |
| rsync -azhe ssh --progress $1 $2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning | |
| # tested on macOS | |
| echo https://github.com/torvalds/linux.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size | |
| # output: | |
| # "size": 1746294, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo killall VDCAssistant | |
| sudo killall AppleCameraAssistant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # created by shuichinet https://gist.github.com/shuichinet | |
| # forked from https://gist.github.com/shuichinet/8159878 21 Nov 2015 | |
| # using minor edits by fcrimins https://www.reddit.com/user/fcrimins from https://www.reddit.com/r/google/comments/2xzgyv/remove_duplicate_songs_from_google_play_music/csh6mrh | |
| # also using clever edits by Morgan Gothard https://medium.com/@mgothard | |
| # updated for Python 3.5 by John M. Kuchta https://medium.com/@sebvance 22 Nov 2016 (hey I was busy) | |
| # compiled by John M. Kuchta https://medium.com/@sebvance | |
| # thanks to shuichinet, fcrimins and Mr. Gothard for their work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~ | |
| mkdir dev_tools | |
| cd dev_tools | |
| ## download SIP source code | |
| wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.7/sip-4.16.7.tar.gz | |
| tar zxf sip-4.16.7.tar.gz | |
| cd sip-4.16.7 | |
| python configure.py | |
| make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat /sys/devices/platform/coretemp.?/hwmon*/hwmon*/temp*_input | |
| cat /sys/devices/platform/coretemp.?/hwmon*/hwmon*/temp*_input | awk '{ total += $1 } END { print total/NR/1000 }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mv "$1" "$1".ori.pdf | |
| gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/prepress -sOutputFile="$1" "$1".ori.pdf | |
| # the PDFSETTINGS can be set to following values for different compression ratio. | |
| # largest printer / prepress | |
| # mid-size ebook | |
| # smallest screen |
OlderNewer