Wanted to test creating a AngularJS directive for dragging an element containing other transcluded elements, mainly other draggable items as well as the accordion directive from AngularJS-UI-Bootstrap
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/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |
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
const QUACK = "app/duck/QUACK"; | |
const SWIM = "app/duck/SWIM"; | |
export default { | |
QUACK, | |
SWIM | |
}; |
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
# The various ${var.foo} come from variables.tf | |
# Specify the provider and access details | |
provider "aws" { | |
region = "${var.aws_region}" | |
access_key = "${var.aws_access_key}" | |
secret_key = "${var.aws_secret_key}" | |
} | |
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> | |
<!-- | |
Created using JS Bin | |
http://jsbin.com | |
Copyright (c) 2016 by yelouafi (http://jsbin.com/sodowa/9/edit) | |
Released under the MIT license: http://jsbin.mit-license.org | |
--> | |
<meta name="robots" content="noindex"> |
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 { AlreadyAuthenticatedError, NotAuthenticatedError, NotAuthorizedError } from '../errors/functional'; | |
import createResolver from '../lib/createResolver'; | |
export const baseResolver = createResolver(); | |
export const isAuthenticatedResolver = baseResolver.createResolver( | |
(root, args, context) => { | |
if (!context.user || !context.user.id) throw new NotAuthenticatedError(); | |
} |
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
server { | |
server_name www.theteachableproject.org; | |
return 301 $scheme://theteachbleproject.org$request_uri; | |
} | |
server { | |
listen 80; | |
listen 443 ssl; | |
server_name theteachableproject.org; |
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
// Taken from: http://stackoverflow.com/questions/20397253/implement-a-delay-on-scope-watch | |
var timeoutPromise; | |
var delayInMs = 0; | |
vm.isEdit = false; | |
$scope.$watch(function () { | |
return vm.editId; | |
}, function (currentValue) { | |
$timeout.cancel(timeoutPromise); //does nothing, if timeout alrdy done |
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
The $data var in POST (create) returns: | |
stdClass Object | |
( | |
[field_name] => slide_image | |
[file_type] => image/jpeg | |
[file_resize] => {"width":900,"height":700} | |
[name] => aaa | |
[caption] => aaa | |
[slideshow_id] => 53501394499c13a204d63af2 | |
) |
NewerOlder