Skip to content

Instantly share code, notes, and snippets.

View Stevoisiak's full-sized avatar

Stevoisiak Stevoisiak

View GitHub Profile

Some notes on transparency in social systems

This is the PC sitting on my desk right now:

...as you can see, it is literally transparent - you can look right into it! The components and physical connections between them, laid bare - they even put stupid lights on many of the components now, anticipating this level of transparency. Must be pretty easy to see how it works, right?

Well, no, of course not. Most of the interesting stuff is still obscured, happening at an atomic level inside what are literal black boxes. The layer at which it is transparent is irrelevant to most of the problems I might have to solve. When discussing the potential benefits of, costs of, and need for transparency in a system, it is critical to first establish the layer being discussed - otherwise, you may very well end up with a gaudy display that serves no real purpose. This is as true in social systems as it is in physical ones such as

@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) {
@lsloan
lsloan / Postman current timestamp for UTC as ISO 8601.md
Last active September 4, 2023 11:44
Postman current timestamp for UTC as ISO 8601

I wanted to know: How can I get the current timestamp for UTC in ISO 8601 format to appear in the body data of a Postman request?

After reading some of the Postman documentation and online comments, this is the solution (using Postman v5.0.1 for Chrome 58.0.3029.110 on macOS 10.12.5) I used:

  1. In the Builder, while editing a request, click the "Pre-request Script" heading below the URL field.

  2. In the editor field that appears, enter this single line of JavaScript:

    postman.setGlobalVariable('timestampUtcIso8601', (new Date()).toISOString());
@waleedahmad
waleedahmad / downtime.py
Last active September 15, 2022 14:59
Python script to monitor your internet down time
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import csv
import sys
import time
import socket
import datetime
@endolith
endolith / readme.md
Created May 22, 2012 17:34
Double file extensions

.rst

The official file extension for reStructuredText files is .txt, but this is a stupid standard that should be ignored.

2.4 What's the standard filename extension for a reStructuredText file?
It's ".txt". Some people would like to use ".rest" or ".rst" or ".restx", but why bother? ReStructuredText source files are meant to be readable as plaintext, and most operating systems already associate ".txt" with text files. Using a specialized filename extension would require that users alter their OS settings, which is something that many users will not be willing or able to do.

.rst.txt

@jethrow
jethrow / IEGet.ahk
Last active February 14, 2020 09:30
; AutoHotkey_L:
IEGet(name="") {
IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame ; Get active window if no parameter
Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs":RegExReplace(Name, " - (Windows|Microsoft) Internet Explorer")
for WB in ComObjCreate("Shell.Application").Windows
if WB.LocationName=Name and InStr(WB.FullName, "iexplore.exe")
return WB
}