We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| <?php | |
| /** | |
| * Looks for unquoted keys in a json string and fixes them ie: {a:"b"} => {"a":"b"} | |
| * @param string $string A json string that is suspect | |
| * @return string A valid json string | |
| */ | |
| function fix_json($string){ | |
| // (no qupte) (word) (no quote) (semicolon) | |
| $regex = '/(?<!")([a-zA-Z0-9_]+)(?!")(?=:)/i'; |
| perl: warning: Setting locale failed. | |
| perl: warning: Please check that your locale settings: | |
| LANGUAGE = (unset), | |
| LC_ALL = (unset), | |
| LC_CTYPE = "UTF-8", | |
| LANG = "en_US.UTF-8" | |
| are supported and installed on your system. | |
| perl: warning: Falling back to the standard locale ("C"). | |
| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
| /* | |
| name: [File.Upload, Request.File] | |
| description: Ajax file upload with MooTools. | |
| license: MIT-style license | |
| author: Matthew Loberg | |
| requires: [Request] | |
| provides: [File.Upload, Request.File] | |
| credits: Based off of MooTools-Form-Upload (https://github.com/arian/mootools-form-upload/) by Arian Stolwijk |
| ## Configure eth0 | |
| # | |
| # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="yes" | |
| ONBOOT=yes | |
| HWADDR=A4:BA:DB:37:F1:04 | |
| TYPE=Ethernet | |
| BOOTPROTO=static |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| #!/bin/bash | |
| # No username or passwords in this script, you should use mysql_config_editor | |
| # to store it securely. The login-path in this script is set to "local-backup" so when you create | |
| # your .mylogin.cnf with the mysql-config-editor make sure it is set the same | |
| # See http://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html | |
| # An example to create your config for a mysql user "backup": | |
| # shell> sudo mysql_config_editor set --login-path=local-backup --host=localhost --user=backup --password | |
| # The backup user in the mysql server needs these privileges: SELECT, RELOAD, SHOW DATABASES, REPLICATION CLIENT |
All updates now moved over to https://github.com/dconnolly/Chromecast-Backgrounds
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
| /** | |
| * Change three lines | |
| * | |
| /* line 11 */ | |
| .select2-container .select2-selection--single { | |
| box-sizing: border-box; | |
| cursor: pointer; | |
| display: block; | |
| height: 34px; | |
| user-select: none; |