Skip to content

Instantly share code, notes, and snippets.

$ErrorActionPreference = 'SilentlyContinue'
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
function generate_checkbox {
param(
[string]$checkboxText,
[string]$package,
[int]$newLocation
)
$checkbox = new-object System.Windows.Forms.checkbox
@lcherone
lcherone / lxc-exec-all.sh
Created September 20, 2017 04:30
LXD run command in all running containers
#!/bin/bash
#
# Run command in all running containers
# Usage: $ ./lxc-exec-all.sh apt update && apt upgrade
#
for container in $(lxc list volatile.last_state.power=RUNNING -c n --format csv); do
lxc exec "$container" "$@"
done
@timjrobinson
timjrobinson / GPUs.txt
Created October 2, 2016 21:43
Folding@Home GPUs.txt - For running GPU Folding on linux
# This file taken from http://fah-web.stanford.edu/file-releases/public/GPUs.txt if this link works you should probably download this file from it.
# Most forum posts link to https://fah.stanford.edu/file-releases/public/GPUs.txt which is incorrect, as this page now has password protection.
# I'm mirroring this here in case the F@H team breaks the link again.
0x1000:0x0001::0:[GPUs.txt file] Updated 20160930 7im
0x1002:0x0002:::[R9600 Pro] (Asus OEM for HP - Primary)
0x1002:0x0003:::[R9600 Pro] (Asus OEM for HP - Secondary)
0x1002:0x0004:::[Rage Fury Pro]
0x1002:0x000a:::[Radeon 7000]
0x1002:0x000b:::[Radeon 7000]
@Uflex
Uflex / clang-format_config.md
Last active November 3, 2019 16:19
Configuration of clang-format for QtCreator

Clang-format in QtCreator

Edit: QtCreator 3.1 introduced a new plugin called Beautifier that supports clang-format. You still have to install the clang tools separately but you don't have to add them as external tools anymore. The plugin can be configured in the options dialog under the beautifier tab > Clang Format. Add a new style and copy the configuration below without the curly braces.

QtCreator doesn't allow using clang-format by default. Watch QTCREATORBUG-10111 for a better integration. As of today, you should use it as an external tool, either replacing your selection or the entire file. If you choose to replace the file, you will have to save it before launching the tool and QtCreator will reload the file, making it impossible to undo/redo afterwards. If you choose to replace your selection, you often have to select the whole function, otherwise you will lose the indentation; clang-format doesn't seem to k