- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
function safe { Set-Variable WhatIfPreference $true -Scope Global }; | |
function unsafe { Set-Variable WhatIfPreference $false -Scope Global -WhatIf:$false }; | |
function isAdmin { | |
$user = [Security.Principal.WindowsIdentity]::GetCurrent(); | |
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator); | |
} | |
function shell { Start-Process powershell -WorkingDirectory $PWD -ArgumentList "-NoLogo" }; | |
function admin { Start-Process powershell -ArgumentList "-NoLogo" -Verb RunAs }; |
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
// ==UserScript== | |
// @name Youtube HD | |
// @author adisib | |
// @namespace namespace_adisib | |
// @description Select a youtube resolution and resize the player. | |
// @version 2025.04.13 | |
// @match https://*.youtube.com/* | |
// @noframes | |
// @grant GM.getValue | |
// @grant GM.setValue |
--- | |
- name: Install MacOS Packages | |
hosts: localhost | |
become: false | |
vars: | |
brew_cask_packages: | |
- atom | |
- docker | |
- dropbox | |
- firefox |
'------------------------------------------------------------------------------ | |
'名称:Reg2Bat_By Slore(生成同名bat文件,支持XP、WIN7、WIN7X64).vbs | |
'功能:REG文件转换为同名的BAT、CMD文件。 | |
'原文http://slore.blogbus.com/logs/52627038.html | |
' REG命令功能有限,仅支持常用类型。 | |
' (REG_SZ、REG_DWORD、REG_BINARY、 | |
' REG_EXPAND_SZ、REG_MULTI_SZ) | |
' | |
' By Slore 【修改by 代码飞扬】 | |
' 更新于:2017年2月16日 |
--- | |
# Original idea found at http://stackoverflow.com/a/39083724 | |
# | |
# ansible -i inventory.ini add-ssh-keys.yml | |
# | |
- name: Store known hosts of 'all' the hosts in the inventory file | |
hosts: localhost | |
connection: local | |
vars: | |
ssh_known_hosts_command: "ssh-keyscan -T 10" |
Create file /etc/systemd/system/[email protected]
. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin
, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
#!/bin/bash | |
# Reset VMware Fusion Networking | |
# Clear out the Configuration | |
sudo rm -f /Library/Preferences/VMware\ Fusion/networking* | |
sudo rm -f /Library/Preferences/VMware\ Fusion/*location* | |
sudo rm -rf /Library/Preferences/VMware\ Fusion/vmnet* | |
sudo rm -rf /var/db/vmware/vmnet-dhcpd-vmnet* | |
# Reconfigure Networking |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<h2>Hello from outside the Shadow DOM!</h2> | |