Skip to content

Instantly share code, notes, and snippets.

@SMSAgentSoftware
SMSAgentSoftware / New-WPFMessageBox
Last active April 28, 2024 11:24
PowerShell function to display a customizable WPF message box / window
Function New-WPFMessageBox {
# For examples for use, see my blog:
# https://smsagent.wordpress.com/2017/08/24/a-customisable-wpf-messagebox-for-powershell/
# CHANGES
# 2017-09-11 - Added some required assemblies in the dynamic parameters to avoid errors when run from the PS console host.
# Define Parameters
[CmdletBinding()]
@sparrc
sparrc / phabricator_readme.md
Last active March 25, 2024 05:59
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers:

@jonathanelbailey
jonathanelbailey / iso_image_edit.psm1
Last active December 20, 2023 19:28
a powershell module that allows for the modification of ISO images.
# this function grabs the iso image from the user supplied http location.
function get-isoimage{
[CmdletBinding()]
param(
$uri,
$workingfolder
)
begin{
$file_name = $uri -replace "http://[\s\S]+\/([\s\S]+\.iso)$",'$1'
$out_file = Join-Path $workingfolder -ChildPath $file_name
@lselden
lselden / out-ssml.ps1
Created February 6, 2020 21:53
TTS using powershell
<#
.SYNOPSIS
Speak text using SSML
.DESCRIPTION
Speak text using SSML, using built in MS speech synthesis. Will output metadata about result, including any embedded <mark>s. This uses the .NET System.Speech library, which uses the older SAPI5 synthesis system.
Based on code from https://github.com/marak/say.js/
@jazzycamel
jazzycamel / threads1.py
Last active March 29, 2023 21:49
Simple example of the correct way to use (Py)Qt(5) and QThread
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from itertools import count, islice
class Threaded(QObject):
result=pyqtSignal(int)
def __init__(self, parent=None, **kwargs):
super().__init__(parent, **kwargs)
@jwsy
jwsy / k3d_rancher.ps1
Last active August 27, 2021 04:07
Script
# Default env vars
$env:CLUSTER_NAME="k3d-rancher"
$env:RANCHER_SERVER_HOSTNAME="rancher.localhost"
$env:KUBECONFIG_FILE="${env:CLUSTER_NAME}.yaml"
date
# Get kubectl and helm
choco list --local-only
choco install kubernetes-cli -y
choco install kubernetes-helm -y
@geekman
geekman / jffs2.py
Created October 26, 2015 16:30
JFFS2 scripts
#!/usr/bin/env python
#
# tool to parse JFFS2 images
# and more importantly, guess the erase block size
#
# 2015.10.19 darell tan
#
from struct import unpack
from argparse import ArgumentParser
@bradymiller
bradymiller / mirrorOpenEMR_sf_git
Created October 31, 2010 09:18
Script to mirror the SF git repo to github, gitorious, bitbucket, assembla and google code
#!/bin/bash
#
# Copyright (C) 2010 Brady Miller <brady@sparmy.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
/*AGENT_SHEET included by CustomCSSforFx*/
/* Draw a line over selected tab. See https://raw.githubusercontent.com/mozilla/gecko-dev/master/browser/base/content/tabbrowser-tab.js for structure */
/* https://www.reddit.com/r/FirefoxCSS/comments/c5aqyn/my_userchromecss_customizations/ for funky styling */
.tabbrowser-tab:not([usercontextid]) .tab-content[selected="true"],
.tabbrowser-tab[usercontextid] .tab-content[selected="true"] .tab-label-container {
background-image: linear-gradient(to bottom,rgba(255,192,0,0),rgba(255,192,153,32));
}
.tabbrowser-tab[unread] .tab-label {
@spcmky
spcmky / ExampleType.php
Last active April 10, 2019 07:52
Symfony2 Form Type Fieldset Example
<?php
// src/Acme/DemoBundle/Form/ExampleType.php
namespace Acme\DemoBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Acme\DemoBundle\Form\Type\FieldsetType;
class ExampleType extends AbstractType {