Skip to content

Instantly share code, notes, and snippets.

Andrew Odendaal ao

Block or report user

Report or block ao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ao
ao / office2016.txt
Created Jul 17, 2019 — forked from Dhanvesh/office2016.txt
Microsoft Office 2016 Activation code
View office2016.txt
@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
@ao
ao / decode_firmware_pwd.py
Created Sep 30, 2018 — forked from nathany/decode_firmware_pwd.py
Decode Mac Open Firmware Password
View decode_firmware_pwd.py
# I forgot the firmware password on my MacBook Air and didn't want to take it in:
# http://support.apple.com/kb/TS2391
# info
# http://paulmakowski.blogspot.com/2009/03/apple-efi-firmware-passwords.html
# run the following command to retrieve your obfuscated firmware password:
# sudo nvram -p | grep security-password
security_password = "%..."
# take the complement of every second bit:
@ao
ao / python_counting_lists.py
Created Sep 25, 2018
Counting in Python using lists
View python_counting_lists.py
# Counting in Python using lists
# by Andrew Odendaal (https://ao.gl/counting-in-python-using-a-list/)
magic = 0x616f-0x414f
numbers = [
(magic/0x186A0),
(magic/0x3E8/8),
(magic/0x3E8/4),
(magic/0o1534-7),
@ao
ao / gist:8a581b0aa4b0ad7e0b7ea865fa03a091
Created Aug 24, 2018
Automatic mouse mover (in python)
View gist:8a581b0aa4b0ad7e0b7ea865fa03a091
from pynput.mouse import Button, Controller
import time
mouse = Controller()
mouse.position = (0, 0)
mouse.move(50, 50)
for i in range(1000):
mouse.move(75, 75)
time.sleep(1)
@ao
ao / Working Digital Ocean Promotional Codes for January, February, March, April and May 2018.md
Last active Feb 2, 2018
Working Digital Ocean Promotional Codes for January, February, March, April and May 2018
View Working Digital Ocean Promotional Codes for January, February, March, April and May 2018.md

Working Digital Ocean Promotional Codes for January, February, March, April and May 2018

Want a Discount?

  1. Sign up with this link to save your first $10!
  2. Use one of the Promocodes below to save an additional $10-$15
  • LOWENDBOX (<- worth the most ($15)!)
  • DODEPLOY (<- $10)
@ao
ao / javascript.js
Created Oct 29, 2016
Codility: A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N.
View javascript.js
function solution(N) {
var binary = N.toString(2);
var length = binary.length;
var ones = [];
for(var i=0; i<length; i++) {
if (binary[i]=='1') ones.push(i);
}
@ao
ao / getServer.py
Last active Oct 26, 2016
Python: Identify/Get the hosting Server from a list of domain names (commandline)
View getServer.py
import sys
import requests
import random
from multiprocessing.dummy import Pool as ThreadPool
'''
Usage:
$ python server.py random 25
$ python server.py google.com
View gist:79eb1cffd1b9cc52d0c8933fb75180c6
----
rm -rf var/di var/generation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:di:compile
chmod -R 777 var
----
View gist:9ccacaf93b16482120790d05be3f626c
python -c "import sys, random; stdout = sys.stdout; sys.stdout = type('BlackHole', (), {'write': (lambda self, string: '')})(); import this; sys.stdout = stdout; print random.choice(''.join([this.d.get(i, i) for i in this.s]).splitlines()[2:]);"
View gist:5d064a0f58e0c1eb8baae4385d62d54c
fortune -s computers | cowsay -f dragon | lolcat
You can’t perform that action at this time.