I hereby claim:
- I am billjohnston on github.
- I am billjohnston (https://keybase.io/billjohnston) on keybase.
- I have a public key ASDrLwq-EnNNKKrHznxvjUR_jGFbW3Tb7TQEyQPNDJJzXQo
To claim this, I am signing this object:
IMPORT_NAME="cognito_import_test" | |
CSV_PATH="/full/path/to/importTest.csv" | |
USER_POOL_ID="asdfasdfasdf" | |
CLOUDWATCH_ROLE_ARN="arn:aws:iam::469973828956:role/CognitoStack-CognitoImportRole95D37A15-20RNO02KSGD5" | |
REGION="us-east-1" | |
JOB_DETAILS=$(aws cognito-idp create-user-import-job --job-name "${IMPORT_NAME}" --user-pool-id "${USER_POOL_ID}" --cloud-watch-logs-role-arn "${CLOUDWATCH_ROLE_ARN}" --region "${REGION}" --profile CognitoService) && \ | |
PRE_SIGNED_URL=$(jq -r '.UserImportJob.PreSignedUrl' <<< "${JOB_DETAILS}") && \ | |
JOB_ID=$(jq -r '.UserImportJob.JobId' <<< "${JOB_DETAILS}") && \ | |
curl -v -T "${CSV_PATH}" -H "x-amz-server-side-encryption:aws:kms" "${PRE_SIGNED_URL}" && \ |
import * as jsonwebtoken from 'jsonwebtoken' | |
import jwkToPem from 'jwk-to-pem' | |
import nodeAjax from 'lambdas/util/nodeAjax' | |
import { HttpMethod } from 'types' | |
import { Middleware } from 'lambda-api' | |
import { | |
cognitoUserPoolId, | |
cognitoUserPoolClientId, | |
region, | |
} from 'lambdas/functions/restApi/envVars' |
curl https://1zfeu833kgom8kvdororgg.hooks.webhookrelay.com -X POST | |
curl https://my.webhookrelay.com/v1/webhooks/0d970bf0-9c84-440a-8013-6835287e6c7b -X POST |
I hereby claim:
To claim this, I am signing this object:
export default const mockFileUpload = (fileInput, fileUrl) => new Promise((resolve, reject) => { | |
try { | |
const xhr = new XMLHttpRequest() | |
xhr.open('GET', fileUrl, true) | |
xhr.responseType = 'blob' | |
xhr.onload = (e) => { | |
if (xhr.status == 200) { | |
fileInput.files[0] = xhr.response | |
const mockEvent = document.createEvent('HTMLEvents') | |
mockEvent.initEvent('change', true, true) |
var resourceDirectives = angular.module('resourceDirectives', ['ui.bootstrap']); | |
var head = angular.element(document.querySelector('head')); | |
head.prepend('<style> .rd_loading .rd_text{visibility: hidden;} .rd_loading .rd_spinner{display: block;} .rd_loading .rd_spinner{display: block;} .rd_spinner{display: none;} .rd_spinner .fa{vertical-align: top;} .rd_position-relative{position: relative;} .rd_absolute-center{position: absolute; margin: auto; text-align: center; top:0; left:0; right:0; bottom:0; width: 1em; height: 1em;}</style>'); | |
resourceDirectives.factory('interpolate_url', [ | |
'resourceDirectivesConfig', '$location', | |
function(resourceDirectivesConfig, $location){ | |
return function(url, params, data){ | |
var match = url.match(/(\:[a-zA-Z_-]*)/g); |
var phantom = require('node-phantom-simple'); | |
var user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36'; | |
var page = 'http://google.com' | |
phantom.create(function (phantom_err, ph) { | |
ph.createPage(function (page_err, page) { | |
page.open(page, function (open_err, status) { | |
page.evaluate(function(){ | |
return navigator.userAgent; | |
}, function(err, result){ |
.DS_Store | |
node_modules/ | |
.nodemonignore |
In Transmit go to: | |
Transmit > Preferences > Cloud | |
Select default extension. | |
Create a new header with the following values: | |
Name: x-amz-acl | |
Value: public-read |
Download phantomjs binary from http://phantomjs.org/download.html | |
upload to home directory (or where-ever really) | |
Un-tar the file with: | |
******************** | |
tar xvjf phantomjs-1.6.1-linux-i686-dynamic.tar.bz2 | |
******************** |