git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| #!/bin/bash | |
| # Disclaimer - make backups, use at your own risk. | |
| # | |
| # Based on this comment: http://stackoverflow.com/a/13944924/843067 | |
| # Views and stored procedures have to be done separately. | |
| OLDDB="old_db_name" | |
| NEWDB="new_db_name" | |
| MYSQL="mysql -u root -pyour_password " |
| <?php | |
| $db_con = mysqli_connect("localhost", "username", "password", "database"); | |
| $result = $db_con->query('SELECT * FROM some_table'); | |
| if (!$result) die('Couldn\'t fetch records'); | |
| $num_fields = mysqli_num_fields($result); | |
| $headers = array(); | |
| while ($fieldinfo = mysqli_fetch_field($result)) { | |
| $headers[] = $fieldinfo->name; | |
| } | |
| $fp = fopen('php://output', 'w'); |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| <?php | |
| class SecureSessionHandler extends SessionHandler { | |
| protected $key, $name, $cookie; | |
| public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
| { | |
| $this->key = $key; | |
| $this->name = $name; |
| <?php | |
| $params = new stdClass; | |
| $params->hpci_site_host_name = baseurl(); | |
| $params->hpci_site_id = '520900'; | |
| $params->hpci_location = 'checkout1'; | |
| $params->hpci_query_string = $_SERVER['QUERY_STRING']; | |
| $params->hpci_api_host = 'https://api-wisvis1stg.c1.hostedpci.com/'; | |
| $params->hpci_api_uid = 'ObtainTestAccount'; | |
| $params->hpci_api_pwd = '*****'; | |
| ?> |
| /** | |
| * jQuery.deparam - The oposite of jQuery param. Creates an object of query string parameters. | |
| * | |
| * Credits for the idea and Regex: | |
| * http://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/ | |
| */ | |
| (function($){ | |
| $.deparam = $.deparam || function(uri){ | |
| if(uri === undefined){ | |
| uri = window.location.search; |
| # -------------------------------------------- | |
| # This code is for Twitter Bootstrap 2! | |
| # -------------------------------------------- | |
| # | |
| # The MIT License (MIT) | |
| # Copyright (c) 2012-2015 Dennis Riehle | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights |
| // UMD dance - https://github.com/umdjs/umd | |
| !function(root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['jquery'], factory); | |
| } else { | |
| factory(root.jQuery); | |
| } | |
| }(this, function($) { | |
| 'use strict'; |
| var MyApp = {}; | |
| MyApp.Router = Backbone.Router.extend({ | |
| routes: { | |
| // general routes for cross-app functionality | |
| "" : "showGeneralHomepage", | |
| "cart" : "showShoppingCart", | |
| "account" : "showMyAccount", | |
| // module-specific subroutes: |
| /* Pretend app setup stuff is here */ | |
| /* Kick off app */ | |
| jQuery(function($) { | |
| var Gallery = app.module("gallery"); | |
| app.Router = Backbone.Router.extend({ | |
| initialize: function() { | |
| this.gallery = new Gallery.Router("gallery/"); |