Skip to content

Instantly share code, notes, and snippets.

View kevr's full-sized avatar

Kevin Morris kevr

View GitHub Profile
INFO:root:starting the client thread
INFO:root:calcsize: 8
INFO:root:auth object: type: 1, direction: 1, args: 0, length: 0,
INFO:root:data being sent: b'\x01\x01\x00\x00\x00\x00\x00\x00'
INFO:root:binary data: 0000000100000001000000000000000000000000000000000000000000000000
INFO:root:sending: b'\x01\x01\x00\x00\x00\x00\x00\x00'
INFO:root:waiting 10 seconds before stopping.
INFO:root:received header data: b''
Press ENTER or type command to continue
INFO:root:starting the client thread
INFO:root:calcsize: 8
INFO:root:auth object: type: 1, direction: 1, args: 0, length: 0,
INFO:root:data being sent: bx01x01x00x00x00x00x00x00
INFO:root:binary data: 0000000100000001000000000000000000000000000000000000000000000000
INFO:root:sending: bx01x01x00x00x00x00x00x00
INFO:root:waiting 10 seconds before stopping.
INFO:root:received header data: b
Press ENTER or type command to continue
static void delay(unsigned long ms)
{
struct timespec tv;
memset(&tv, 0, sizeof(tv));
tv.tv_sec = 0;
tv.tv_nsec = 1000000L * ms;
nanosleep(&tv, NULL);
}
@kevr
kevr / Class.md
Last active January 31, 2017 06:42
Learn C++ classes

C++ Classes

Introduction

When writing classes in a programming language, we can think of them as a direct correlation to nouns in the English language. For example, I have a dog named Spirit. We want to represent Spirit in code, so we write a class to represent a dog.

class Dog
{
};
function GetImage(){
if(jQuery('div.sm-lightbox-focused').length > 0)
{
jQuery('div.sm-lightbox-focused').addClass('.sm-lightbox-clean');
jQuery('div button.sm-lightbox-close').click();
}
var last = "";
jQuery('li.sm-tile-photo a div').each(function(i,e){
[root@coders ~]# cat /usr/local/bin/mkuser
#!/usr/bin/env bash
if [ $# -lt 3 ]; then
echo "usage: $(basename $0) username \"Full Name\" [email protected]"
exit 0
fi
tmp="$(pw useradd $1 -w random -o -c "${2}" -s /usr/local/bin/bash -d /usr/home/$1 -m)"
www_groups=$(IFS=' ' read -a arr <<< "$(groups www)"; echo "${arr[@]:1}" | sed 's/ /,/g')
Connecting to omega.ccsfcc.net:6697...
SSL Handshake intiated...
Connected.
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)