Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Dhanvesh
Dhanvesh / office2016.txt
Created June 5, 2018 16:34
Microsoft Office 2016 Activation code
@echo off
title Activate Microsoft Office 2016 ALL versions for FREE!&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Office Standard 2016&echo - Microsoft Office Professional Plus 2016&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo ============================================================================&ech
@pvik
pvik / hibernate-on-low-battery.sh
Last active September 14, 2018 21:21
Hibernate on Low Battery, when acpi does not report proper battery status
#!/bin/sh
# Battery threshold below which, script will hibernate if discharging
batt_threshold=20
# temporary file to store the previous battery charge value, to determine if battery is being discharged
batt_charge_file="/tmp/batt_charge"
# read in batt charge from acpi
echo "`acpi -b`, `cat /tmp/batt_charge`%" | awk -F'[:,%]' '{print $2, $3, $5, ($5 - $3), ($3-$5)<0?"discharging":"powered"}' | {
read -r acpi_status capacity old_capacity capacity_diff status
@vrdhn
vrdhn / launcher
Created December 18, 2014 16:27
a dmenu+xdotool launcher which can paste to terminal and show often used commands at top
#!/usr/bin/python3
# launcher (C) vrdhn0@gmail.com
# A dmenu & xdotool based launcher
# Features
# * Select from previously entered commands, or enter new one
# * Listing sorted by usage frequency
# * pasted to application using xdotool
# * terminate by '&' to launch as X application
# * manipulate ~/.config/launcher.db to add/remove/bump usage count
@jcyamo
jcyamo / i3-exit
Last active October 9, 2020 10:26
Exit script for the i3 window manager based off of exit script from CrunchBang Linux.
#!/usr/bin/env python
# based on cb-exit used in CrunchBang Linux <http://crunchbanglinux.org/>
import pygtk
pygtk.require('2.0')
import gtk
import os
import getpass