Skip to content

Instantly share code, notes, and snippets.

View miguelfc's full-sized avatar

Miguel Fernandes miguelfc

View GitHub Profile
  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
@miguelfc
miguelfc / splitFunction.java
Created February 10, 2017 09:51
Split Conditions from Tivoli PDTs
private Set<String> extractConditionsFromPdt(String pdt) {
Integer point = pdt.indexOf(" \\*OR ");
String orRegex = "(\\(?[^(]+) \\*OR ([^)]+\\)?)";
Pattern orPattern = Pattern.compile(orRegex);
Matcher orMatcher = orPattern.matcher(pdt);
Set<String> conditions = new HashSet<>();