If you want to run Arch on a Laptop, use pure Intel hardware as much as possible. Especially for WiFi. Next use NVIDIA hardware if you need a discreet video card. AMD support is lacking to say the least.
Say you support multiple clients or multiple projects but don't want everything on your shell at once. This script in your .bashrc
file will allow you to automatically create aliases for any directory that has it's own .bashrc file. It starts a new bash shell so no existing variables are overwritten and you can exit when needed.
For example, say you have project or client named superx
and another named johndoe
. You create a directory superx
and johndoe
. Within each you pust a custom .bashrc file and optional .superx-secrets and .johndoe-secrets file and then your shell (upon next login) will detect those files and alias them to the parent directory's name. So if I want superx
stuff, I just run superx
and vice versa for johndoe
.
Some references:
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-environment http://www.linuxjournal.com/content/tech-tip-dereference-variable-names-inside-bash-functions http://stackoverflow.com/questions/3601515/how-to-check-if-a-v
(with-open [zip (ZipOutputStream. (io/output-stream "target/lambda.zip"))] | |
(doseq [f (file-seq (io/file *compile-path*)) :when (.isFile f)] | |
(.putNextEntry zip (ZipEntry. (subs (.getPath f) (+ 1 (count *compile-path*))))) | |
(io/copy f zip) | |
(.closeEntry zip))) |
#!/bin/bash | |
bucket=$1 | |
set -e | |
echo "Removing all versions from $bucket" | |
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
#!/bin/bash | |
# !!!!DESTRUCTIVE!!!! | |
# This will delete all local docker images. | |
CleanDocker () { | |
docker ps -aq | xargs docker rm | |
docker images | awk '{print $1":"$2}' | xargs docker rmi | |
docker volume prune | |
} |
The basics here are to make sure you include the externs for advanced compliation and then to wrap the S3 client with an AWSXray capture client.
(def S3 (nodejs/require "aws-sdk/clients/s3"))
(def s3-client (S3. (clj->js {:httpOptions {:timeout 10000}})))
vs
(def S3 (nodejs/require "aws-sdk/clients/s3"))
(def AWSXRay (nodejs/require "aws-xray-sdk"))
(def s3-client (.captureAWSClient AWSXRay (S3. (clj->js {:httpOptions {:timeout 10000}}))))
Most Cursive IDE nREPL solutions point to the Figwheel approach which good but is a little cumbersome.
You can also use piggieback (which Figwheel also uses).
Update your project.clj as such:
(defproject blah "0.0.1"
:profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.2"]]}
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}})
-- Setup an AWS Athena Application Load Balancer table via | |
-- http://docs.aws.amazon.com/athena/latest/ug/application-load-balancer-logs.html | |
-- Use the following to query between timestamps. | |
SELECT * FROM "sampledb"."alb_logs" | |
where date_parse(time, '%Y-%m-%dT%H:%i:%s.%fZ') | |
between TIMESTAMP'2017-12-20 03:00:00' and TIMESTAMP'2017-12-20 05:00:00' | |
limit 10; |
for p in $(aws iam list-policies --query 'Policies[?starts_with(PolicyName, `start-pipeline`) == `true`].Arn' --output text); do | |
for v in $(aws iam list-policy-versions --policy-arn $p --query 'Versions[?IsDefaultVersion == `false`].VersionId' --output text); do | |
aws iam delete-policy-version --policy-arn $p --version-id $v | |
done | |
aws iam delete-policy --policy-arn $p | |
done |
import yaml | |
from aws_cdk import core | |
class RawStack(core.Stack): | |
def __init__(self, scope: core.Construct, name: str, template_path: str, wrapped_parameters=None, | |
**kwargs) -> None: | |
"""import a stack off a path and munge in ssm variables if desired | |
:param template_path: path to raw stack being imported | |
:param wrapped_parameters: map of Parameter keys and default values |