I hereby claim:
- I am mazz on github.
- I am mazz (https://keybase.io/mazz) on keybase.
- I have a public key whose fingerprint is 81DA A3FA EF1C DDF3 B15A A6B4 A953 707A A850 34D5
To claim this, I am signing this object:
| // this chunk of code loads a jpeg image into a cgimage | |
| // creates a second crop of the original image with CGImageCreateWithImageInRect | |
| // writes the new cropped image to the desktop | |
| // ensure that the xy origin of the CGRectMake call is smaller than the width or height of the original image | |
| NSURL *originalImage = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"lockwood" ofType:@"jpg"]]; | |
| CGImageRef imageRef = NULL; | |
| CGImageSourceRef loadRef = CGImageSourceCreateWithURL((CFURLRef)originalImage, NULL); | |
| if (loadRef != NULL) |
| # These are installation specific values created when PyQt4 was configured. | |
| _pkg_config = { | |
| 'pyqt_bin_dir': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin', | |
| 'pyqt_config_args': '', | |
| 'pyqt_mod_dir': '/Library/Python/2.7/site-packages/PyQt4', | |
| 'pyqt_modules': 'QtCore QtGui QtHelp QtMultimedia QtNetwork QtDBus QtDeclarative QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns phonon QtDesigner', | |
| 'pyqt_sip_dir': '/System/Library/Frameworks/Python.framework/Versions/2.7/share/sip/PyQt4', | |
| 'pyqt_sip_flags': '-x VendorID -t WS_MACX -x PyQt_NoPrintRangeBug -t Qt_4_8_4 -x Py_v3 -g', | |
| 'pyqt_version': 0x040a00, | |
| 'pyqt_version_str': '4.10', |
| [michael@varga (Fri Mar 29 19:14:18) /Library/Python/2.7/site-packages]% cd ~/Downloads/PyQt-mac-gpl-4.10 | |
| [michael@varga (Fri Mar 29 19:14:22) ~/Downloads/PyQt-mac-gpl-4.10]% make | |
| /Developer/Tools/Qt/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I. -F/Library/Frameworks -D__APPLE__ -D__GNUC__ qpytextobject.h -o moc_qpytextobject.cpp | |
| g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -fPIC -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/System/Library/Frameworks/Pyt |
| #function to get data from queue | |
| def _get_tweets(size=10): | |
| tweets = [] | |
| # Get ten messages and break out | |
| count = 0 | |
| message_count = _queue_message_count() | |
| print("size: " + str(size) + " message_count: " + str(message_count)) | |
| if message_count > 0: |
| cd initpyr | |
| ./initpyr.py -n foo -s | |
| cd foo_env/foo | |
| ../bin/pserve development.ini | |
| web browser: http://0.0.0.0:6543/login | |
| user: admin | |
| pass: admin |
I hereby claim:
To claim this, I am signing this object:
There are two modes when you don't want Certbot to edit your configuration:
Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.
In the following, we're setting up mydomain.com to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
1 Welcome to Sonic Pi
Welcome to Sonic Pi. Hopefully you're as excited to get started making crazy sounds as I am to show you. It's going to be a really fun ride where you'll learn all about music, synthesis, programming, composition, performance and more.
But wait, how rude of me! Let me introduce myself - I'm
| # DUBSTEP | |
| # Combines ideas from my other gists | |
| current_bpm = 140.0 | |
| use_bpm current_bpm | |
| # WOBBLE BASS | |
| define :wob do | |
| use_synth :dsaw | |
| lowcut = note(:E1) # ~ 40Hz | |
| highcut = note(:G8) # ~ 3000Hz |