GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.
For more information, visit our search help section.
GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.
For more information, visit our search help section.
This gist will explain you how to enable an undocumented feature of PHP-FPM which will give a real-time performance stats.
Everybody knows the famous phpinfo() and the page it generates, right? Then the real-time PHP-FPM status page design is very similar.
Some informations from the top are not displayed to avoid security issues.
| #!/bin/sh -eu | |
| # | |
| # Put this script in your ~/bin directory! | |
| # | |
| : ${HOMEBREW_PREFIX:=/usr/local} | |
| export LIBARCHIVE="${HOMEBREW_PREFIX}/opt/libarchive/lib/libarchive.dylib" | |
| export LIBCRYPTO="${HOMEBREW_PREFIX}/opt/[email protected]/lib/libcrypto.dylib" | |
| OPENDROP_GIT="git+https://github.com/seemoo-lab/opendrop.git" |
| rm -f /var/log/lastlog-* | |
| rm -f /var/log/maillog-* | |
| rm -f /var/log/messages-* | |
| rm -f /var/log/secure-* | |
| rm -f /var/log/spooler-* | |
| rm -f /var/log/tallylog-* | |
| rm -f /var/log/wtmp-* | |
| rm -f /var/log/yum.log-* | |
| rm -f /var/log/lastlog-* | |
| rm -f /var/log/maillog-* |
First download the install app bundle. Older versions can be hard to find but the current version of the time you read this, can be found in the App Store.
To create a drive run this command: hdiutil create -o /tmp/Mojave.cdr -size 6200m -layout SPUD -fs HFS+J.
Next you will need to mount that drive hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build.
Use the downloaded app bundle to create the media: sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build.
| #!/usr/bin/env ruby | |
| # Usage: no_automount /Volumes/My\ Disk | |
| diskinfo = `diskutil info '#{ARGV[0]}'`.gsub("\n\n", "\n").split("\n").collect { |b| | |
| b.strip.split(/:\s+/) | |
| }.to_h | |
| disk_uuid = diskinfo['Volume UUID'] | |
| disk_type = diskinfo['Type (Bundle)'] |
| FROM alpine:latest | |
| RUN apk add --update php python py-pip mysql-client \ | |
| && pip install awscli \ | |
| && rm -rf /var/cache/apk/* | |
| RUN touch crontab.tmp \ | |
| && echo '* */6 * * * /usr/bin/php /var/www/partkeepr/app/console partkeepr:cron:run' > crontab.tmp \ | |
| && echo '0 2 * * * /usr/bin/sql_backup' >> crontab.tmp \ | |
| && crontab crontab.tmp \ |
| #!/bin/bash | |
| # Cache sudo password | |
| sudo -v | |
| # Get latest OpenSSL 1.0.2 version from https://openssl.org/source/ | |
| # v1.1.0 seems to have removed SSLv2/3 support | |
| openssl_version=1.0.2k | |
| # Install build dependencies |
Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.
The original author seems to be Charles Edge, here's the original content, as pointed out by @percisely.
Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and s
| MRuby::CrossBuild.new('x86_64-apple-darwin14') do |conf| | |
| toolchain :clang | |
| # include the default GEMs | |
| conf.gembox 'default' | |
| [conf.cc, conf.objc, conf.asm].each do |cc| | |
| cc.command = 'x86_64-apple-darwin14-clang' | |
| end | |
| conf.cxx.command = 'x86_64-apple-darwin14-clang++' |