This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This script can be used as an action inside vRealize Automation to handle | |
# logging into deployed servers after deployment. | |
# | |
# It's provided as-is. If you'd like to use it, there are multiple changes needed. | |
# I.e. vraUrl to point to your own vRA. The username that's used to SSH. The way it decides | |
# which servers to log into. | |
# | |
# Martijn Smit <martijn@lostdomain.org> | |
# https://lostdomain.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from collections import OrderedDict | |
findreplace = [ | |
('fa fa-500px', 'fab fa-500px'), | |
('fa fa-address-book-o', 'far fa-address-book'), | |
('fa fa-address-card-o', 'far fa-address-card'), | |
('fa fa-adn', 'fab fa-adn'), | |
('fa fa-amazon', 'fab fa-amazon'), | |
('fa fa-android', 'fab fa-android'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global $CC, Utils, $SD */ | |
/* THIRD PARTY */ | |
// https://github.com/joewalnes/reconnecting-websocket/blob/master/reconnecting-websocket.js | |
(function(global, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define([], factory); | |
} else if (typeof module !== 'undefined' && module.exports) { | |
module.exports = factory(); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from Smile import Smile | |
import json | |
async def main(): | |
smile = Smile("192.168.0.0", "password") | |
await smile.connect() | |
await smile.update_locations() | |
# Get the current power consumption in watts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Laravel's Sanctum is not great at validating bearer tokens. | |
* If you want to validate a token for more than "does it exist", you need to do it manually. | |
* Here's an example inside an controller: | |
*/ | |
class ApiSearchController extends Controller | |
{ | |
public function store(Request $request) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# brew install tmuxp | |
# tmuxp load tmuxp.yaml | |
session_name: laravel-app | |
windows: | |
- window_name: laravel-app | |
layout: tiled | |
panes: | |
- docker-compose -f docker-compose.yml up | |
- php artisan serve | |
- npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm uninstall tailwindcss postcss autoprefixer | |
npm install tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) { | |
if (message.action === "googleMeetBringToFront") { | |
chrome.tabs.query({}, function (tabs) { | |
let meetFound = false; | |
for (let i = 0; i < tabs.length; i++) { | |
if (tabs[i].url.includes('meet.google.com')) { | |
meetFound = true; | |
chrome.tabs.update(tabs[i].id, { selected: true }); | |
chrome.windows.update(tabs[i].windowId, { focused: true }); |
OlderNewer