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
| sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original | |
| # for Mountain Lion 10.8.3 - 10.8.4 | |
| sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage | |
| # for Mountain Lion 10.8.1-10.8.2 and Lion 10.7.5 | |
| #sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x4D)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage | |
| # for Mountain Lion 10.8.0 and Lion 10.7.4 BELOW | |
| #sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x51)| |
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
| --- | |
| - name: Test split | |
| hosts: localhost | |
| gather_facts: false | |
| vars: | |
| - facter_blockdevices: "sda,sdb,sdc,sdd,sde,sdf" | |
| tasks: | |
| - name: Let's split | |
| debug: var=item | |
| with_items: "facter_blockdevices.split(',')" |
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
| This Gist contains the script and generated output file for an Acer B276HUL. | |
| To "install" the output file, put it in `/System/Library/Displays/Overrides/DisplayVendorID-472` | |
| The pre-generated file below is known to work with: | |
| * OS X Mavericks | |
| * OS X Yosemite |
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
| import collections | |
| def dict_merge(dct, merge_dct): | |
| """ Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
| updating only top-level keys, dict_merge recurses down into dicts nested | |
| to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
| ``dct``. | |
| :param dct: dict onto which the merge is executed | |
| :param merge_dct: dct merged into dct |
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
| <!DOCTYPE html> | |
| <html ng-app="myApp"> | |
| <head> | |
| <meta name="description" content="Trigger toasters on events"> | |
| <script src="https://code.jquery.com/jquery.min.js"></script> | |
| <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script> | |
| <link href="https://cdnjs.cloudflare.com/ajax/libs/angularjs-toaster/0.4.15/toaster.min.css" rel="stylesheet" /> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js" ></script> |
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
| git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
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
| <a href="http://idaretolisten.org"><img height="200" width="300" src="https://s3-us-west-2.amazonaws.com/idaretolisten.org/images/campaign_sm.jpg"></a> | |
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
| # These keybindings are a combination of IntelliJ's OS X 10.5+ keybindings | |
| # and additive ones from Pivotal's practice. And extended by @andre487 | |
| # This file uses CoffeeScript Object Notation (CSON). | |
| # If you are unfamiliar with CSON, you can read more about it here: | |
| # https://github.com/bevry/cson#what-is-cson | |
| # | |
| # Project navigation | |
| # |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Alpha Component</key> | |
| <real>1</real> | |
| <key>Blue Component</key> | |
| <real>0.0</real> |
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
| import time | |
| import functools | |
| def retry(wait, retries=3, reraise=True): | |
| """ Decorator retries a function if an exception is raised during function | |
| invocation, to an arbitrary limit. | |
| :param wait: int, time in seconds to wait to try again | |
| :param retries: int, number of times to retry function. If None, unlimited | |
| retries. |
OlderNewer