This file contains 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
Instructions for restoring a set of arbitrary records from a backup database, which preserves autoincrement IDs. | |
In the backup database, create a new table that only contains the records that should be restored. | |
CREATE new_mytable LIKE mytable; | |
INSERT INTO new_mytable SELECT * FROM mytable WHERE [condition of records that should not have been deleted]; | |
Export the new_mytable from the backup, and import it in to the production DB | |
mysqldump -h <backuphost> -P <port> -u <username> -p mydatabase new_mytable > new_mytable.sql |
This file contains 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> | |
<head> | |
<meta charset="utf-8"> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.2/d3.min.js" charset="utf-8"></script> | |
<style> | |
body > canvas, body > svg { | |
position: absolute; | |
top: 0; | |
left: 0; |
This file contains 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
// Mocked Service | |
angular.module('mock.users', []). | |
factory('UserService', function($q) { | |
var userService = {}; | |
userService.get = function() { | |
return { | |
id: 8888, | |
name: "test user" | |
} |
This file contains 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
<CORSConfiguration> | |
<CORSRule> | |
<AllowedOrigin>{{YOUR SITE HERE, e.g. https://example.com}}</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedHeader>Content-*</AllowedHeader> | |
<AllowedHeader>Host</AllowedHeader> | |
<AllowedHeader>x-amz-*</AllowedHeader> | |
</CORSRule> | |
</CORSConfiguration> |
This file contains 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
function PhoneDetailCtrl($scope, $routeParams, $http) { | |
//... | |
} |
This file contains 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
{ | |
"Version": "2008-10-17", | |
"Id": "0c762de8-f56b-488d-a4a4-20d1cb31df2f", | |
"Statement": [ | |
{ | |
"Sid": "Allow in my domains", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, |
This file contains 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
$(function() { | |
var url = '/rss'; | |
var $list = $('#recent-posts'); | |
$.ajax({ | |
url: url, | |
type: 'GET', | |
dataType: 'xml', | |
success: function(data) { | |
var $items = $(data).find('item'); | |
$items.each( function() { |