Skip to content

Instantly share code, notes, and snippets.

@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active May 16, 2024 23:31
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@mazewei
mazewei / drupalgap Extension
Created March 15, 2014 14:28
extension for drupal module DrupalGap. Manipulate the webservice to submit also term names, not only term ids
//TODO backend for configure taxonomy ref fields
/**
* Implements hook_services_request_postprocess_alter().
*/
function bdi_tax_tid_services_request_postprocess_alter($controller, $args, &$result) {
if ($controller['callback'] === '_node_resource_retrieve') {
$fieldnames = array();
//your fieldnames here
@ice423cube
ice423cube / tax_tid.module
Created March 12, 2014 21:08
Drupalgap Add Taxonomy Name Drupal 7 Module.
<?php
// $Id$
/**
* @file
* Swaps Taxonomy TID to the actual Name of the file in Services REST results
*
*/