Swazzy

Notes, Designs, and Solutions

  • Home
  • Blog
  • About
    • Disclaimer
    • Privacy Policy
  • Get Volume ID of a Volume, if it exists

    Get Volume ID of a Volume, if it exists

    volume_name=”Name of your volume” volume_id=`aws ec2 describe-volumes –filters Name=tag-key,Values=diskuse,Name=tag-value,Values=${volume_name} |jq -r –arg zone “$zone” ‘[.Volumes[] | select( (.State==”available”) and (.AvailabilityZone==$zone))][0] | .VolumeId’`

    alex

    April 21, 2018
    AWS, Developing, Shell
    awscli, jq, oneliner
  • Generate Certificates using openssl One Liner

    Generate Certificates using openssl One Liner

    This is useful for scripting the generation of certificates for web servers. openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \ -subj “/C=${node.ssl.country}/ST=${node.ssl.state}/L=${node.ssl.city}/O=${node.ssl.ou}/CN=${node.ssl.cn}” \ -keyout /etc/ssl/private/node-selfsigned.key -out /etc/ssl/certs/node-selfsigned.crt

    alex

    April 21, 2018
    Developing, Shell, Uncategorized
  • Set Message Attribute on SQS Message

    Set Message Attribute on SQS Message

    Example on setting message attribute on SQS Message. Subscribers can perform actions based on the attributes. queue.send_message(MessageBody=json.dumps(instance), MessageAttributes={ ‘instance_id’: { ‘DataType’: ‘String’, ‘StringValue’: instance[‘InstanceId’] } } )

    alex

    April 21, 2018
    AWS, Developing, Python, Uncategorized
  • Monitor an SQS Queue based on your instance id

    Monitor an SQS Queue based on your instance id

    Example of monitoring an SQS queue for messages that an attribute instance_id, which is set to your EC2 instance. The python subscriber can be used to monitor a shared SQS and act upon messages targeted at a specific instance id. #!/usr/bin/env python3 import boto3 import requests import subprocess import os import time boto3.setup_default_session(region_name=”${aws.region}”) sqs = […]

    alex

    April 21, 2018
    AWS, Developing, Python, Queues, SQS
    boto3, message_attributes, Python, SQS
  • Alfresco ADF 2.3 the TL;DR version.

    Alfresco ADF 2.3 the TL;DR version.

    Install NPM https://www.npmjs.com/get-npm Start Alfresco Content Services, and Alfresco Process Services. Locally via SDK with default user/pass (admin:admin) #Fill in prompt to generate your project mvn archetype:generate -Dfilter=org.alfresco.maven.archetype: #After Project Generation, navigate into the project folder. chmod 755 run.sh ./run.sh Clone ADF project from github: git clone https://github.com/Alfresco/alfresco-ng2-components Navigate into the project’s demo-shell sub folder: cd alfresco-ng2-components/demo-shell […]

    alex

    April 19, 2018
    ADF, Alfresco, Developing, SDK
    acs, adbp, ADF, alfresco, alfresco development framework, angular, APS, drag-n-drop, TLDR, working-demo
  • How to convert SVG to PNG on a MAC?

    How to convert SVG to PNG on a MAC?

    This simple command will allow you to generate a PNG of a Font Awesome SVG icon, in the color that you want.   sed -i ” ‘s/path /path fill=”#2E74B5″ /’ fontawesome.svg ; qlmanage -t -s 24 -o . fontawesome.svg Command Breakdown: gnu-sed is used, instead of OSX sed shipped with the mac. brew install gnu-sed […]

    alex

    April 18, 2018
    Developing, Documentation, Shell
    fontawesome, mac, osx, png, sed, svg, svg-conversion
  • Alfresco Default Administrators

    Alfresco Default Administrators

    Issue: Default Administrators identified in Alfresco does not give the user Administrative privileges Troubleshooting: Check that there isn’t any space in your comma delimited list of names. Recommendations: If you are using LDAP sync to synchronize users, an LDAP admin group should be defined, and this group should be nested under the ALFRESCO_ADMINISTRATORS group.

    alex

    April 11, 2018
    Alfresco, Debugging, Developing, Java, Repository, Share
    alfresco, debug, default-administrators, issues, Troubleshooting
  • Overriding Solr Configurations in Alfresco SDK 3.0

    Overriding Solr Configurations in Alfresco SDK 3.0

    This post allows the user to override the Alfresco Solr configurations in the Alfresco SDK 3.0 TL;DR Override Tomcat’s Solr context configuration to point to custom Solr4 config dir. Copy default Solr configurations into this directory. Override new configurations as needed. Override Solr Context Configurations First we will add a config element in our main […]

    alex

    September 18, 2017
    Alfresco, Developing, Java, Repository, SDK, Solr
  • RAD! Alfresco SDK 3.0. Upgrade and enjoy!

    RAD! Alfresco SDK 3.0. Upgrade and enjoy!

    Why upgrade SDK 3.0? Support for RAD (Rapid Application Development) and TDD (Test Driven Development) via HotswapAgent and JRebel Simpler SDK layout Jar packaging by default Support for Alfresco version 4.2 to 5.2 Integration testing webscripts TL;DR Update your pom.xml Remove all SDK modules, except for your jar/amp project modules. Update your Integration tests. Add integration-tests project module, […]

    alex

    April 3, 2017
    Alfresco, Developing, Java, Repository, Share
  • Smart Lighting

    Smart Lighting

    Overview Smarter automated lighting can be achieved a few different ways, but the end result could all be similar. In that, lights can respond in hue, lumens and brightness based on time of the day, events such as motion, open/closed door, temperature, music, waking up, mood, etc. Automated lighting can be implemented with one or […]

    alex

    February 5, 2017
    Easy, Intermediate, Lighting, Smart Home, SmartThings
Previous Page
1 2 3 4
Next Page

Proudly Powered by WordPress

 

Loading Comments...
 

    • Follow Following
      • Swazzy
      • Already have a WordPress.com account? Log in now.
      • Swazzy
      • Edit Site
      • Follow Following
      • Sign up
      • Log in
      • Report this content
      • View site in Reader
      • Manage subscriptions
      • Collapse this bar