Skip to content

Instantly share code, notes, and snippets.

@TheBigBear
TheBigBear / Dockerfile_vboxfs.tmpl
Last active August 29, 2015 13:59 — forked from nsfmc/Dockerfile.tmpl
Seeking to get a boot2docker iso file for my Mac to allow me to boot a modified tinycore linux image that has the virtual box fs drivers for using shared folders already included
# $VBOX_VERSION should probably be something like 4.3.10 or somesuch
#
FROM boot2docker/boot2docker-rootfs
RUN apt-get install p7zip-full
RUN mkdir -p /vboxguest && \
cd /vboxguest && \
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \
sh VBoxLinuxAdditions.run --noexec --target . && \
C:\temp\fakepackage> choco.exe source add -n local -s c:\packages -debug
Chocolatey v0.9.9.0
Chocolatey is running on Windows v 6.2.9200.0
Unpacking helpers\chocolateyInstaller.psm1 to 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'
Unpacking helpers\functions\Get-BinRoot.ps1 to 'C:\ProgramData\chocolatey\helpers\functions\Get-BinRoot.ps1'
Unpacking helpers\functions\Get-CheckSumValid.ps1 to 'C:\ProgramData\chocolatey\helpers\functions\Get-CheckSumValid.ps1'
Unpacking helpers\functions\Get-ChocolateyUnzip.ps1 to 'C:\ProgramData\chocolatey\helpers\functions\Get-ChocolateyUnzip.
ps1'
Unpacking helpers\functions\Get-ChocolateyWebFile.ps1 to 'C:\ProgramData\chocolatey\helpers\functions\Get-ChocolateyWebF
@TheBigBear
TheBigBear / gist:223069ea1e4394ea962b
Created February 8, 2015 19:34
why does it skip the auto-uninstaller when the auto-uninstaller feature is on?
C:\temp\fakepackage> choco feature
Chocolatey v0.9.9.0
checksumFiles - [Enabled]
autoUninstaller - [Enabled]
allowInsecureConfirmation - [Disabled]
C:\temp\fakepackage> choco install windirstat
Chocolatey v0.9.9.0
Installing the following packages:
windirstat
By installing you accept licenses for the packages.
@TheBigBear
TheBigBear / ReadMe.md
Last active February 8, 2023 10:53
get a file from web URL and figure out it's filename

I am trying to get a powershell script that I can call with one (or two) params.

Ideally I would like to pass only one paramter, the $Url and expect the script to figure out the filename and then download to that filename.

IF it does not figure out a filename, I can optionally pass a second parameter the $FolderPath

# get-FileFromUri.ps1
function get-FileFromUri {
  param(
@TheBigBear
TheBigBear / gist:bb99cab5fcf0a7d2fdd4
Created February 14, 2015 13:09
how to overcome this powershell quoting or invalid path issue?
this code stumbles over the $Path being invalid , because some Uninstall entries contain characters that aren't valid in a file path, but are perfectly valid inside the regisry.
it gives me the error:
```
Get-ItemProperty : Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is
not valid: Bomgar Jump Client [help.ict-software.org-5478B883]
At C:\temp\Do-Uninstall.ps1:2 char:92
+ ... l" | foreach { gp $_.PSPath } | ? { '$_' -match "Wget-1.11.4-1_is1" } | select U ...
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-ItemProperty], ParameterBindingException
@TheBigBear
TheBigBear / gist:3fa65236939b68dc7285
Created February 16, 2015 18:00
debug output for: winrepo.update_git_repos on a masterless windows minion fails with KeyError git.latest #20732
this is for salt/saltstack issue #20732
C:\salt>salt-call.exe --local -l all winrepo.update_git_repos
[DEBUG ] Reading configuration from c:\salt\conf\minion
[TRACE ] loading log_handlers in ['c:\\salt\\var\\cache\\salt\\minion\\extmods\\log_handlers',
[TRACE ] Skipping c:\salt\var\cache\salt\minion\extmods\log_handlers, it is not a directory
[TRACE ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq
[DEBUG ] Configuration file path: c:\salt\conf\minion
[DEBUG ] Reading configuration from c:\salt\conf\minion
[TRACE ] loading grain in ['c:\\salt\\var\\cache\\salt\\minion\\extmods\\grains', 'C:\\salt\\s
@TheBigBear
TheBigBear / ReadMe.md
Last active November 5, 2021 10:45
first simple python jinja2 writer to control config files of a bunch of openwrt WL APs

I want to write a simple python 2.7 jinja2 writer that writes out text config files for WL AccessPoints

I have the following structure in my directory ~/Documents/PyCharmProjects:

config-data.csv
mk-wl-ap-configs.py
shadow.jinja
network.jinja
wireless,jinja

What are MS GUIDs and howto deal with them. (both on windows and unix/linux)

They look ugly like this {BFEAB774-C7DC-4032-B05A-DA5F7CB7B365} and are basically globally unique identifiers.

The MS msi installer uses a GUID to uniquely identify a software or module.

https://en.wikipedia.org/wiki/Windows_Installer

Tools to deal with GUIDs

Get-AzureVM -ServiceName "name_cloud_service" -Name "vm_name"
Get-AzureVM -ServiceName "name_cloud_service" -Name "vm_name" | Get-AzureEndpoint

Keybase proof

I hereby claim:

  • I am TheBigBear on github.
  • I am thebigbear (https://keybase.io/thebigbear) on keybase.
  • I have a public key whose fingerprint is 228C D3EA 4E16 F39E 207F B955 753F 5852 2B1E AD2B

To claim this, I am signing this object: