Skip to content

Instantly share code, notes, and snippets.

View teocci's full-sized avatar
👨‍💻
Coding

Teocci teocci

👨‍💻
Coding
View GitHub Profile
@teocci
teocci / activateoffice2019.md
Created May 1, 2020 13:19 — forked from CHEF-KOCH/activateoffice2019.md
How to activate Office 2019
  • Download the Retail Office 2019 images (or standalone) (MS currently does not provide VL images for Windows [only MAcOS])
  • Go to https://github.com/abbodi1406/BatUtil/tree/master/OfficeC2R-R2V and download it
  • Install Office 2019 (Retail)
  • Use C2R-R2V (start the batch with admin rights)
  • Wait until all is finished
  • Activate Office with KMSAuto.Net, MSToolkit, batch scripts or manually like you would do with a normal KMS version
@echo off
Title Converter Office 2016 Retail to Volume
echo Press Enter to start VL-Conversion...
echo.
pause
echo.
for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G
@teocci
teocci / Activate Office 2019 for macOS VoL.md
Created March 4, 2020 08:28 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@teocci
teocci / androidPlayAudio.java
Created June 7, 2019 05:47 — forked from yavor87/androidPlayAudio.java
Record, play and visualize raw audio data in Android
ShortBuffer mSamples; // the samples to play
int mNumSamples; // number of samples to play
void playAudio() {
new Thread(new Runnable() {
@Override
public void run() {
int bufferSize = AudioTrack.getMinBufferSize(SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO,
AudioFormat.ENCODING_PCM_16BIT);
if (bufferSize == AudioTrack.ERROR || bufferSize == AudioTrack.ERROR_BAD_VALUE) {
/*
* Copyright (c) 2014 by Bart Kiers
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
@teocci
teocci / tcpClient1.py
Created August 1, 2017 08:24 — forked from mike-zhang/tcpClient1.py
a simple tcp client(python code)
#! /usr/bin/python
# a simple tcp client
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', 12345))
#sock.send('Test\n')
sock.send(raw_input("Please input : "))
print sock.recv(1024)
sock.close()
@teocci
teocci / udpClient1.py
Created August 1, 2017 08:24 — forked from mike-zhang/udpClient1.py
a simple udp client (python code)
#! /usr/bin/python
# a simple udp client
import socket,time,traceback
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
dstHost = ('192.168.1.100', 12345)
while True:
try:
client.sendto('3',dstHost)
print time.time(),' : send success'
@teocci
teocci / tcpServer1.py
Created August 1, 2017 08:20 — forked from mike-zhang/tcpServer1.py
a simple tcp server (python code)
#! /usr/bin/python
# a simple tcp server
import socket,os
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('127.0.0.1', 12345))
sock.listen(5)
while True:
connection,address = sock.accept()
buf = connection.recv(1024)
print buf
@teocci
teocci / udpServer1.py
Created August 1, 2017 08:20 — forked from mike-zhang/udpServer1.py
a simple udp server (python code)
#! /usr/bin/python
# a simple udp server
import socket, traceback
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(("127.0.0.1",12345))
while 1:
try:
@teocci
teocci / nmapScanUdp.py
Created August 1, 2017 08:19 — forked from mike-zhang/nmapScanUdp.py
udp端口扫描(python-nmap代码)
#! /usr/bin/python
import nmap
# python-nmap url : http://xael.org/norman/python/python-nmap/python-nmap-0.1.4.tar.gz
nm = nmap.PortScanner()
nm.scan(hosts='192.168.1.0/24', arguments='-n -p 161 -sU ')
hosts_list = [(x, nm[x][u'udp'][161]['state']) for x in nm.all_hosts()]
#print nm.all_hosts()
#print nm[u'192.168.1.100'][u'udp'][161]['state']