Skip to content

Instantly share code, notes, and snippets.

View hhbadarin's full-sized avatar
:octocat:
Focusing

Haitham Badarin hhbadarin

:octocat:
Focusing
View GitHub Profile
Sub PrintActiveSheet()
Dim ws As Worksheet: Set ws = ThisWorkbook.ActiveSheet
With ws.PageSetup
.Orientation = xlLandscape
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
.PrintArea = "B1:R41"
@giordanocardillo
giordanocardillo / README.MD
Last active May 24, 2025 19:10
Remove Office 2016 Product Key

Caution

Due to the subject of this Gist there are a lot of spam/scam comments. I try to remove them all as soon as possible. I don't recommend you to click on any link in the comments

How to remove Microsoft Office 2016 Product Key

  1. Open a command prompt as Administrator
  2. In the command prompt, type the following:
  • Office 2016 (32-bit) on a 32-bit version of Windows

cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

@maciakl
maciakl / servicetag.cmd
Created March 11, 2015 03:04
Windows batch script to find vendor tag / serial number (eg. Dell Service Tag), vendor name, model name and installed OS on the current machine. All the info is dumped into info.txt file on the Desktop.
@echo off
rem This script will attempt to find this systems Dell Service Tag
rem The tag will be recorded in info.txt on the desktop
mode 15,1
title [~]
set FILE="%USERPROFILE%\Desktop\info.txt"
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';