Skip to content

Instantly share code, notes, and snippets.

@skylerberg
skylerberg / init.sls
Created August 22, 2014 17:34
Trying to use cmd.script
modules:
cmd.scipt:
#- name: salt://bug-tracking/files/modules.sh
- name: salt://hello.sh
- cwd: /var/www/bugzilla-4.4.5
- env:
- 'HOME': '/var/www/bugzilla-4.4.5'
- require:
- pkg: perl
def merge_patch(target, patch):
if isinstance(patch, dict):
if not isinstance(target, dict):
target = {}
for name, value in patch.iteritems():
if value is None:
if name in target:
del target[name]
else:
target[name] = merge_patch(target[name], value)
duration = 1 # second
freq = 440 # Hz
for _ in range(15):
os.system('play --no-show-progress --null --channels 1 synth %s sine %f' % (duration, freq))
time.sleep(29)
@skylerberg
skylerberg / mouse.sh
Created May 27, 2018 19:27
Turn off cursor acceleration in ubuntu
xset m 00