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
[ | |
{ | |
"backcolor": "#e8e1ca" | |
}, | |
[ | |
{ | |
"x": 0.25, | |
"c": "#413c2c", | |
"t": "#f1ecda", | |
"p": "SA R1", |
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
var $color = {}; | |
(function () { | |
function Lab (l, a, b) { this.l = l; this.a = a; this.b = b; } | |
$color.Lab = function (l,a,b) { return new Lab(l,a,b); }; | |
function XYZ (x, y, z) { this.x = x; this.y = y; this.z = z; } | |
$color.XYZ = function (l,a,b) { return new XYZ(x, y, z); }; | |
function sRGBLinear (r, g, b) { this.r = r; this.g = g; this.b = b; } | |
$color.sRGBLinear = function (r,g,b) { return new sRGBLinear(r,g,b); }; |
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/bin/env node | |
/// | |
/// Very simple script to convert a normal JS module to a RequireJS-compatible | |
/// AMD module; intended for command-line usage, and integration into build | |
/// systems. | |
/// | |
/// Reads from stdin & writes to stdout; output can be piped to uglifyjs to | |
/// minify/compress the code. | |
/// | |
/// Examples: |
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
function Confirm-Host { | |
<# | |
.SYNOPSIS | |
Prompts the user to OK or Cancel an operation via the host. | |
.DESCRIPTION | |
Prompts the user to OK an operation by hitting ENTER or cancel | |
it by hitting ESC. | |
.EXAMPLE | |
if(Confirm-Host) { ... } | |
.OUTPUTS |
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
#requires -Version 2 | |
Add-Type -Name _e9b6b3c331bdc58f488487320803ad89 -namespace _e95bcd88febe44bf44ad6600fdd509e7 -MemberDefinition @' | |
[DllImport("kernel32",CharSet=CharSet.Unicode)] public static extern int GetPrivateProfileStringW(string section, string key, string def, IntPtr retVal, int size, string filePath); | |
[DllImport("kernel32",CharSet=CharSet.Unicode)] public static extern int GetPrivateProfileStringW(string section, IntPtr key, string def, IntPtr retVal, int size, string filePath); | |
[DllImport("kernel32",CharSet=CharSet.Unicode)] public static extern int GetPrivateProfileStringW(IntPtr section, IntPtr key, string def, IntPtr retVal, int size, string filePath); | |
[DllImport("kernel32",CharSet=CharSet.Unicode)] public static extern long WritePrivateProfileStringW(string section, string key, string val, string filePath); | |
'@ | |
function Read-IniFile { | |
<# | |
.SYNOPSIS |
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
param( | |
[int]$Delay = 0 | |
) | |
$Win32 = Add-Type -Name WinAPICall -Namespace SystemParametersInfo -PassThru -MemberDefinition @' | |
[DllImport("user32.dll", EntryPoint = "SystemParametersInfo")] | |
public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, uint pvParam, uint fWinIni); | |
'@ | |
if($Win32::SystemParametersInfo(0x17,$delay,$null,0)) { | |
Write-Host "Keyboard delay changed to: $delay" | |
} 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
param ( | |
[string]$UserName = "$((Get-ChildItem Env:USERDOMAIN).Value)\$((Get-ChildItem Env:USERNAME).Value)", | |
[string]$Password = $(Read-Host "Enter a password for user '$UserName'") | |
) | |
# Set up auto-logon | |
$resumed = 0 | |
$auditing = 0 | |
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State").ImageState -ne "IMAGE_STATE_COMPLETE") { | |
$auditing = 1 |
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
; Exposes two hotkeys: | |
; - Win+G generates & pastes a new lowercase guid | |
; - Win+Shift+G generates & pastes a new UPPERCASE guid | |
; In both cases, the guid is left on the clipboard so you can easily paste it more than once. | |
; | |
GUID() | |
{ | |
format = %A_FormatInteger% ; save original integer format | |
SetFormat Integer, Hex ; for converting bytes to hex | |
VarSetCapacity(A,16) |
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
@echo off | |
for /f "tokens=1,2 delims=: " %%Q IN ('mode con:') DO IF "%%Q"=="Columns" SET _COLS=%%R | |
SET /A _COLS=%_COLS% - 13 | |
SET _P= | |
:loop | |
SET _P=%_P%- | |
SET /A _COLS=%_COLS% - 1 | |
IF %_COLS% GTR 0 goto :loop | |
SET PROMPT=%_P%$S$T$_$P$G |
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
@echo off & setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
set LOOKUP=0123456789abcdef &set HEXSTR=&set PREFIX= | |
if "%1"=="" echo 0&goto :EOF | |
set /a A=%* || exit /b 1 | |
if !A! LSS 0 set /a A=0xfffffff + !A! + 1 & set PREFIX=f | |
:loop | |
set /a B=!A! %% 16 & set /a A=!A! / 16 | |
set HEXSTR=!LOOKUP:~%B%,1!%HEXSTR% | |
if %A% GTR 0 goto :loop | |
echo %PREFIX%%HEXSTR% |
NewerOlder