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
// Define and declare a custom jest expectation so we can handle clock drift tolerances | |
declare global { | |
// eslint-disable-next-line @typescript-eslint/no-namespace | |
namespace jest { | |
interface Matchers<R> { | |
toBeWithinTolerance(center: number, tolerance: number): R; | |
} | |
} | |
} |
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
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] | |
=> issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"), query = ";userPrincipalName;{0}", param = c.Value); |
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
using UnityEngine; | |
using System.Collections; | |
public class ScreenShot : MonoBehaviour { | |
//Default is None, you should set this to whatever you want in the inspector | |
public KeyCode screenshotKey = KeyCode.None; | |
// Use this for initialization | |
void Start () { |
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
/* | |
* For use with Unity 4.5 | |
*/ | |
using UnityEngine; | |
using System.Collections; | |
public class OpenWebLink : MonoBehaviour { | |
public string url; |
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
#!/usr/local/bin/node | |
//quick and dirty to get my scripts going quickly on awsbox from cron. Will clean this up some other time. | |
var path = require('path'); | |
var child_process = require('child_process'); | |
var configFile = path.join(process.env['HOME'], 'config.json'); | |
var config = require(configFile); |
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
# apache-config-watch - checks config changes and reloads apache if the configs are ok | |
description "Reload apache when configs have changed." | |
author "Michael McHugh <[email protected]>" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
respawn |
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
#!/bin/bash | |
# | |
# We use this code from cron to automate nightly volume snapshots. | |
# In our case we have two volumes. | |
# | |
# | |
export EC2_KEYPAIR=MY-KEY-PAIR | |
export EC2_URL=https://ec2.ap-southeast-2.amazonaws.com | |
export AWS_ACCESS_KEY=accesskey | |
export AWS_SECRET_KEY=secretkey |
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 file is used to test any input that is also used as an output to ensure sanitisation has occured: | |
Usage: on any form input enter something like: | |
<script src="thisfile.js"></script> | |
*/ | |
alert('If this alert box worked then you need to sanitise your output!'); |
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
#!/bin/bash | |
# | |
# 1. Put this somewhere like /usr/local/bin/fakemail.sh | |
# 2. Set the permissions with: chmod a+x /usr/local/bin/fakemail.sh | |
# 3. Edit your php.ini and set: sendmail_path=/usr/local/bin/fakemail.sh | |
# | |
# Now your email will not be sent but logged to unique files that are timestamped. | |
# We use $RANDOM just to try and reduce collissions in case multiple emails are sent at the same time. | |
# |
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 works for my model anyway, use | |
echo 0x069b >> ~/.android/adb_usb.ini | |
adb kill-server | |
adb devices |
NewerOlder