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
/*************************** | |
NOT MAINTAINED! from ~2014 | |
****************************/ | |
// cs4+ script for resizing objects proportionally to fit inside artboard | |
// based on: https://forums.adobe.com/message/4164590 | |
// usage: create a new document with desired artboard size, paste object, select it, run this script | |
// bugs: centering does not work after changing artboard size | |
var activeDoc = app.activeDocument |
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
/*************************** | |
NOT MAINTAINED! from ~2015 | |
****************************/ | |
// photoshop script to resize images proportionally to fit inside a 1024px box i.e. longest side/edge will equal 1024px | |
// useful when scaling down many large photos for web use, simply toss in a batch action | |
var activeDoc = app.activeDocument | |
var docWidth = activeDoc.width | |
var docHeight = activeDoc.height |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title></title> | |
<!-- <meta name="robots" content="noindex,nofollow"> --> | |
<meta name="description" content=""> | |
<meta name="theme-color" content="#fff"> |
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
const AWS = require('aws-sdk') | |
const s3 = new AWS.S3() | |
const BUCKET_NAME = 'MyBucket' | |
async function main() { | |
try { | |
const data = await s3.headBucket({ Bucket: BUCKET_NAME }).promise() | |
return `Bucket "${BUCKET_NAME}" exists` |
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
/* | |
Disable annoying highlight/select on click | |
https://css-tricks.com/almanac/properties/u/user-select/ | |
*/ | |
.button { | |
-webkit-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
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
// useful when a 'followed' redirect needs to happen, etc. | |
// https://github.com/insin/get-form-data | |
function $forEach(arr, cb) { | |
var arrLen = arr.length | |
for (var i = 0; i < arrLen; i++) cb(arr[i]) | |
} | |
function $form(action, method, fields) { | |
var form = document.createElement('form') |
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
// \s - any whitespace character (including \t, \n and a few others) | |
// \S - any non-whitespace character | |
// \w - any word character (uppercase and lowercase latin alphabet, numbers 0-9, and _) | |
// \W - any non-word character | |
// \b - word boundary (boundaries between \w and \W, matches in-between characters) | |
// \B - non-word boundary (inverse of \b) | |
// (?!) - negative lookahead | |
// (?=) - positive lookahead | |
// (?<=) - positive lookbehind | |
// (?<!) - negative lookbehind |
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
application/doc | |
application/msword | |
application/rtf | |
application/vnd.ms-word.document.macroEnabled.12 | |
application/vnd.oasis.opendocument.text | |
application/vnd.openxmlformats-officedocument.wordprocessingml.document | |
application/x-abiword | |
application/x-iwork-pages-sffpages | |
application/x-rtf | |
application/x-soffice |
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
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html | |
# https://docs.aws.amazon.com/cli/latest/index.html | |
# https://stedolan.github.io/jq/ | |
aws dynamodb scan \ | |
--table-name tableName \ | |
--profile dev \ | |
--page-size 5 | jq .Items[] | jq {field1:.field1.S,field2:.field2.S} | json2csv |
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
const AWS = require('aws-sdk') | |
const Promise = require('bluebird') | |
const filesize = require('filesize') | |
// AWS.config.update({ accessKeyId: '', secretAccessKey: '', region: '' }) | |
const s3 = new AWS.S3() | |
const cloudwatch = new AWS.CloudWatch() | |
const TWELVE_HOURS_IN_SECONDS = 43_200 |
OlderNewer