Skip to content

Instantly share code, notes, and snippets.

@AlexTape
AlexTape / download website assets
Last active September 15, 2017 11:05 — forked from christiangenco/download website assets
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@AlexTape
AlexTape / build_opencv.md
Created June 7, 2017 15:29 — forked from BartG95/build_opencv.md
How to: build OpenCV x64 with Qt on Visual Studio 2015 Community Preview and Windows 10 Preview (build 10162)

Note: since I switched to free software (aka GNU+Linux), I don't maintain this tutorial anymore.

How to: build OpenCV x64 with Qt on Visual Studio 2015 Community Preview and Windows 10 Preview (build 10162)

Introduction

As I'm an update addict, I like to try preview software. Or I'm an update addict because I like preview software. I don't know. Anyway, before my holiday started, I used OpenCV for a project in college. I like the library, because it's possible to achieve fun things with it and it makes vision easy. So when my holiday began, I started using OpenCV for some fun projects. And then I upgraded Windows 10. It wasn't stable back then, but I didn't need my pc for a while, so I could try it. Also I installed Visual Studio 2015 and I started to make OpenCV project.

Unfortunately, the pre-build binaries currently don't support Visual Studio 2015 (or, more precisely, msvc 14). The only option was to build OpenCV myself. So here is my tutorial of building OpenCV. As stated in the title, this is a x

@AlexTape
AlexTape / gist:404df02966c3084b7fab
Created October 28, 2015 13:20 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

# list hidden users
dscl . list /Users | grep -v '^_'
# list all known user informations
dscl . -read /Users/%USER%
# list groupmembers
dscl . -read /Groups/%GROUP% GroupMembership
@AlexTape
AlexTape / android_instructions.md
Created October 21, 2015 11:13 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@AlexTape
AlexTape / web_mech.pl
Last active August 29, 2015 14:27
Perl Mechanize Webpage
use strict;<br>
use WWW::Mechanize;<br>
my $username = "USER"; # Login<br>
my $password = "PASSWORD"; # Password<br>
my $url = "http://www.myurl.com"; # Your URL Name<br>
my $mech = WWW::Mechanize->new();<br>
$mech->get($url);<br>
## Browse the HTML source of the ASP page to get these parameters <br>
$mech->form("form_Name"); # The Login Form Name<br>
$mech->field("txt_id", $username); # Username Texbox name<br>
@AlexTape
AlexTape / androidbuf.h
Last active August 29, 2015 14:27 — forked from dzhioev/gist:6127982
#include <android/log.h>
class androidbuf: public std::streambuf {
public:
enum { bufsize = 128 }; // ... or some other suitable buffer size
androidbuf() { this->setp(buffer, buffer + bufsize - 1); }
private:
int overflow(int c) {
if (c == traits_type::eof()) {
*this->pptr() = traits_type::to_char_type(c);
@AlexTape
AlexTape / ConnectMySQL.sh
Last active August 29, 2015 14:23
ConnectMySQL.sh
sudo apt-get install mysql-client
------
shell> mysql --host=localhost --user=myname --password=mypass mydb
shell> mysql -h localhost -u myname -pmypass my
class MyThreadClass
{
public:
MyThreadClass() {/* empty */}
virtual ~MyThreadClass() {/* empty */}
/** Returns true if the thread was successfully started, false if there was an error starting the thread */
bool StartInternalThread()
{
return (pthread_create(&_thread, NULL, InternalThreadEntryFunc, this) == 0);