All updates now moved over to https://github.com/dconnolly/Chromecast-Backgrounds
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 | |
| # 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 |
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!
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
| ## 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 |
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: [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 |
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
| 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"). | |
| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
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
| <?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'; |
NewerOlder