Skip to content

Instantly share code, notes, and snippets.

View SomwareHR's full-sized avatar

SomwareHR SomwareHR

View GitHub Profile
@David-Lor
David-Lor / mqtt_sub_template.sh
Created November 22, 2019 15:30
Bash MQTT subscribe (mosquitto_sub) with callback
#!/bin/sh
mosquitto_sub -h localhost -t test -v | while read -r topic payload
do
echo "Rx @ ${topic}: ${payload}"
done
@scotgabriel
scotgabriel / Windows command line gui access.md
Last active November 11, 2023 14:53
Common windows functions via rundll user32 and control panel

Rundll32 commands

OS: Windows 10/8/7

Add/Remove Programs

  • RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0

Content Advisor

  • RunDll32.exe msrating.dll,RatingSetupUI

Control Panel

@robcarver17
robcarver17 / temp.py
Last active January 2, 2024 06:02
Get IB historical data native python API updated for bar class
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
@fmasanori
fmasanori / pdf2txt.py
Created August 9, 2017 00:25
pdf2txt
#!/usr/bin/env python
"""
Converts PDF text content (though not images containing text) to plain text, html, xml or "tags".
"""
import sys
import logging
import six
import pdfminer.settings
pdfminer.settings.STRICT = False
@ap0llo
ap0llo / Export-Chart.ps1
Created January 15, 2017 19:08
Powershell script to export charts from excel to jpg
# Powershell script to export charts from excel to jpg
function Export-Chart($inputFile, $sheetName, $chartIndex, $outputFile)
{
# Load Powerpoint Interop Assembly
[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.Excel") > $null
[Reflection.Assembly]::LoadWithPartialname("Office") > $null
$msoFalse = [Microsoft.Office.Core.MsoTristate]::msoFalse
$msoTrue = [Microsoft.Office.Core.MsoTristate]::msoTrue
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@sunnyone
sunnyone / ApacheLogParser.psm1
Created December 15, 2012 03:56
Apache Log Parser for PowerShell
function Read-ApacheLog
{
param(
[Parameter(Mandatory=$true)]
[string]
$Path
)
Get-Content -Path $Path | Foreach-Object {
# combined format
@wilmoore
wilmoore / ie6winxp.vm.md
Created January 31, 2012 17:32
Windows 7 VM w/ IE (Virtualbox)

This will provide a much faster and favorable experience VS RDC over network (or worse, the internet). It also gives you free reign to do whatever else you might want to do on windows (which for me isn't much, but a nice-to-have none-the-less).

The following list of commands will get you a free (microsoft sponsored) Windows XP VM environment with IE6 installed. The password is "Password1". When you first login, you will be asked to activate the OS. Do this immediately over the internet. You will get 90 days of activation. Once this runs out, activate the snapshot called "The initial VM state" to go back in time.

% mkdir -p ~/.vm/hdds/windows/winxp-ie6/
% cd !$

% wget http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/Windows_XP_IE6.exe
% unrar e Windows_XP_IE6.exe