Skip to content

Instantly share code, notes, and snippets.

View wavescholar's full-sized avatar
🎯
Focusing

Bruce Campbell wavescholar

🎯
Focusing
  • These are projects that I have developed out of academic interest or as part of various consulting roles.
  • Columbus, Ohio
View GitHub Profile
@wavescholar
wavescholar / gist:b85a3be3685112110bd3
Last active August 29, 2015 14:06
RPM & YUM Commands
yum repolist
yum repolist enabled
yum repolist disabled
yum repolist all
Syntax Description Example(s)
rpm -ivh {rpm-file} Install the package rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm
@wavescholar
wavescholar / gist:da3ca722e231c84c41b7
Created September 1, 2014 02:42
Fedora Linux Setup - Step 1
On a clean system
yum groupinstall "Authoring and Publishing" "Administration Tools"
yum groupinstall "Books and Guides" "C Development Tools and Libraries" "Development Tools" "Fedora Eclipse" "System Tools" "Editors"
I use Intel Composer
https://software.intel.com/en-us/articles/using-intelr-compilers-for-linux-under-fedora
Follow the instructions for ia32 libraries or only install x64 bin.
@wavescholar
wavescholar / gist:68f86080a2497fdce6dc
Created August 11, 2014 02:30
Floating Point Exception Demo
#include <cfloat>
#include <iostream>
#include <sstream>
#include <cmath>
using namespace std;
string FPClass(double x)
{
int i = _fpclass(x);
using System;
class klGDIBitmapConversion
{
public static System.Drawing.Bitmap MainConv(System.Drawing.Bitmap img)
{
System.Drawing.Bitmap b = img;// new System.Drawing.Bitmap("test.jpg");
SplashImage(b, 0, 0);
DateTime dtFaq = DateTime.Now;
System.Drawing.Bitmap b0 = CopyToBpp(b, 8);
TimeSpan tsFaq = DateTime.Now - dtFaq;
using System;
using System.Collections.Generic;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using klManagedImaging;
using System.Drawing;
//Quite Literally - scraps
//Scraps of Bitmap Interop GDI+ code I did not want to loose.
@wavescholar
wavescholar / gist:10565397
Created April 13, 2014 01:51
Modify Path in C++
//Try to set the path to the Matlab binaries. The below does not work. The runtime
//tries to load the dependencies before this can be executed. Investigate delay loadding of dll.
//The code is kept here for reference.
//I have previously experienced an issue where the environment variable can not be used. There is a maximun path
//length of 2048 for the system environment variable. Exceeding this will cause
//myriad problems with a Windows 7 system. If you find you icon image cache is corrupt - check the
//length of your path variable.
//char* envV= getenv("PATH");
////Returns an errno if there is a problem.
////int setOK = _putenv( "PATH=C:\\Program Files\\MATLAB\\R2012b\\bin\\win64;%PATH%");
@wavescholar
wavescholar / gist:10152479
Last active August 29, 2015 13:58
Stream Cipher Code - Experimental
#include <string>
#include <iostream>
#include <map>
#include <vector>
#include <cctype>
int to_int(int c) {
if (! isxdigit(c)) return -1; // error: non-hexadecimal digit found
if (isdigit(c)) return c - '0';
if (isupper(c)) c = tolower(c);
@wavescholar
wavescholar / gist:5432219
Created April 22, 2013 03:16
git config http.postBuffer 524288000
git config http.postBuffer 524288000