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
# Powershell scripts can be used in .git/hooks very easily ex: | |
# #!/usr/bin/env sh | |
# pwsh -noprofile -F "C:\Code\pre-commit.ps1" | |
$files = (git diff --cached --name-only --diff-filter=ACM); | |
if ( $files -like '*.tf' ) { | |
$tfFmtResults = terraform fmt -recursive | |
if ($LASTEXITCODE -ne 0){ |
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
<!-- | |
These are bindings for Saitek X55 Hotas for https://github.com/solidshadow1126/VTOLVRPhysicalInput. | |
Unfortunately the button and axis bindings as reported (by joy.cpl, or sites such as https://gamepad-tester.com/) | |
differ from what DirectX via SharpDX (library used by this mod) understands. | |
These bindings were created by hooking up the mod to a debugger and trial and error. | |
Please consult the "map" to actual HOTAS keys (as reported by tools such as the config app for the HOTAS) below: | |
Stick: | |
Pitch and Roll are bound as expected |
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
# Should be put into powershell's $PROFILE which acts similar to a .bashrc | |
# ex: notepad $PROFILE | |
New-Alias which Get-Command | |
# Get process by port #, ex: "port 8080" -> Find culprit process *cough* random postgres server *cough* | |
function port { | |
Get-Process -Id (Get-NetTCPConnection -LocalPort $args[0]).OwningProcess | |
} |
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
// ==UserScript== | |
// @name GoogleSearchShowURL | |
// @description Puts URL under search result in green (YK, like it used to) | |
// @version 1 | |
// @grant none | |
// @include https://www.google.com/search* | |
// @run-at document-end | |
// ==/UserScript== | |
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
<template> | |
<v-data-table | |
:items="items" | |
:headers="itemHeaders" | |
:multi-sort="true" | |
:sort-by="sort" | |
:sort-desc="true" | |
> | |
<template v-slot:header.action> | |
<slot /> |
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 dateutil.parser | |
from ruletypes import RuleType | |
# elastalert.util includes useful utility functions | |
# such as converting from timestamp to datetime obj | |
from util import ts_to_dt | |
# Modified version of http://elastalert.readthedocs.io/en/latest/recipes/adding_rules.html#tutorial | |
# to catch events happening outside a certain time range |
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
// ==UserScript== | |
// @name GitHubHeaderFixer | |
// @namespace GitHubHeaderFixer | |
// @version 1.0 | |
// @description Removes GitHub's Dark Header | |
// @include https://github.com/* | |
// @include https://*.github.com/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
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
//Please consult Instructions on usage and setup here: https://www.reddit.com/r/arma/comments/5l6g9n/record_yourself_from_a_different_perspective/dbul78j/ | |
//Code for Zeus GameMaster module's init field: | |
this addEventHandler ["CuratorObjectPlaced",{ | |
_arg1 = _this select 1; | |
if(_arg1 isKindOf "Helicopter") then{remoteVehicle = vehicle _arg1}; | |
}]; |
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
1) Add ezp in index.html: | |
- For whatever reason, not including both copies of jquery causes a moduleerr(?) | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.js"></script> | |
<script src='https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.18/src/jquery.ez-plus.js'></script> | |
<script src='https://cdn.rawgit.com/igorlino/angular-elevatezoom-plus/1.1.18b/js/angular-ezplus.js'></script> | |
1b) Add in ezplus to angular dependecies in app.js: | |
angular.module('custom', [..., 'ezplus'])... |
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
//INSERT WITH THE OTHER METHODS: | |
- name: setLoginBehavior | |
summary: | | |
Sets the behaviour that the module will attempt to use for authorize(). | |
description: | | |
Be sure to set this before calling authorize if this is needed. It is | |
recommended to follow Facebook's [guidelines](https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9) | |
for ideal login behavior | |
type: Number |
NewerOlder