- Open Automator
- Create a new Service
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction - Set the script action to
/usr/local/bin/atom -n "$@" - Set “Pass input” to
as arguments - Save as
Open in Atom
| #!/bin/bash | |
| iptables -F | |
| iptables -t nat -F | |
| iptables -P INPUT ACCEPT | |
| iptables -P OUTPUT ACCEPT | |
| iptables -P FORWARD DROP | |
| export LAN=ens160 #change to your nic | |
| export WAN=ens192 #change to your nic |
Chef and VMware are a natural pairing and there are several tools available to enhance the integration.
Knife is a command-line tool that provides an interface between a local chef-repo and the Chef server and allows you to manipulate objects on the Chef server. Knife plugin allows your computer to talk to a 3rd party systems like vSphere or vRA. A plugin can create a VM in vSphere and then bootstrap it with Chef, for example, or it can expose your vRa catalog to your workstation so you don't need to use a GUI.
The following are the main interfaces with VMware and Chef our "knife" plugins.
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
| $EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml" | |
| $xml = [xml](get-content $EC2SettingsFile) | |
| $xmlElement = $xml.get_DocumentElement() | |
| foreach ($element in $xmlElement.Property) | |
| { | |
| if ($element.Name -eq "AutoSysprep") | |
| { | |
| $element.Value="Yes" | |
| } |
| #-------------------- | |
| # | |
| # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
| # | |
| # Licensed under the Customer Agreement (the “License”). You may not use this file except in compliance with the License. A copy of the License is located at | |
| # | |
| # http://aws.amazon.com/agreement | |
| # | |
| # or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | |
| # |
| #Requires -Version 4.0 | |
| [CmdletBinding()] | |
| Param( | |
| [switch]$OnlineInstall = $false | |
| ) | |
| <# | |
| .NOTES |
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DriverFlighting\Partner] | |
| "TargetRing"="Drivers" |
Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.
If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3
HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.
Follow along...
| # encoding: utf-8 | |
| ### Sample script to export Chef Server nodes and import them to Chef Compliance | |
| ### Change the 'api_url', 'api_user', 'api_pass' and 'api_org' variables below | |
| ### Change the nodes_array json suit your environment | |
| ### Go to your chef-repo and check Chef Server access first | |
| # cd chef-repo; knife environment list | |
| ### Save this Ruby script as kitchen_sink.rb and run it like this: | |
| # cat kitchen_sink.rb | knife exec | |
| ### Chef Compliance API docs: https://docs.chef.io/api_compliance.html |
