Skip to content

Instantly share code, notes, and snippets.

View inequation's full-sized avatar
🤔

Leszek Godlewski inequation

🤔
View GitHub Profile
#include "WAVframework.h"//#include "Talkthrough.h"
#include <math.h>
int sample = 0;
float t = 0.f;
int buffer[5000];
#define TARGET_FREQ 30.f
@inequation
inequation / Neuron.c
Created March 5, 2012 06:13
Sample Vala intermediate C code
// Sample Vala intermediate C code, as compiled from
// https://github.com/inequation/PerceptVala/blob/master/src/Neuron.vala
/* Neuron.c generated by valac 0.12.1, the Vala compiler
* generated from Neuron.vala, do not modify */
#include <glib.h>
#include <glib-object.h>
#include <float.h>
@inequation
inequation / szpark.c
Created May 14, 2012 17:41
Lab AK - SPARC
#include <stdio.h>
#include <stdlib.h>
extern int f(int start, int end, int step);
// a(n) = n * a(n - 1) * (a(n - 2))^2
// a(1) = 3
// a(2) = 4
extern int a(int n);
@inequation
inequation / hello.c
Created June 26, 2012 12:10
Lab AK - PVM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pvm3.h>
#define BUFSIZE 256
int parent(int argc, char *argv[]);
int child();
@inequation
inequation / gist:3034800
Created July 2, 2012 18:36
Drawer models
std::queue< std::pair<int, int> * > task_queue;
void draw_pooled(int w, int h, const char *fname) {
unsigned char *buf;
buf = new unsigned char[w * h * 3];
Scene::GetInstance().PrepareRender(w, h);
bool tasks_issued = false;
@inequation
inequation / extract-file-list.py
Last active December 23, 2015 08:09
A tool to extract file names from Visual Studio project files to makefile includes
#!/usr/bin/python
import sys
import os
if (len(sys.argv) < 3):
print("Usage: {0} <VC++ project file> <output directory>".format(sys.argv[0]))
exit()
f = open(sys.argv[1], 'r')
@inequation
inequation / gist:8708932
Created January 30, 2014 14:01
Casting madness
// g++ test.cpp -o test -m32
#include <stdint.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
void *foo = (void *)0xF0000000;
int bar = 0;
int64_t x = reinterpret_cast<int32_t>(foo) | (static_cast<int64_t>(bar) << 32);
@inequation
inequation / hdd2ssd-dualboot.md
Last active December 9, 2022 00:58
Guide to migrating a dual-boot Linux/Windows system to an SSD

Having painstakingly performed the operation of migrating dual-boot systems to SSDs (without a fresh install of any of the systems) twice in the recent days, I've decided to write the steps down in case I ever need to repeat it. It may also benefit someone else on the internet. This is the most efficient and least error-prone workflow to the best of my knowledge, and discovering it was not as easy as it may seem.

Please excuse the somewhat short-hand form of this guide; I take the liberty to assume the reader is a power-user and is at least familiar with Linux.

The scenario

Here are the specific conditions I worked under:

  • Dual-boot, Linux/Windows system.
  • MBR partition tables.
@inequation
inequation / wusb54gc-v2-on-windows-8.md
Created December 22, 2015 14:36
Short guide to installing Linksys WUSB54GC v2 drivers on Windows 8

I haven't been able to find a working, pre-packaged driver for this WiFi stick at all. It seems that this revision (v2) was short-lived and its support was likewise. One can only find support articles for the original device revision ("v1") and the final one (v3), but not for v2. To add insult to injury, all revisions use different chipsets, which makes them totally different devices, not just "revisions", and -- by extension -- their drivers cannot be used interchangeably.

For tl;dr just scroll down to solution.

Why doesn't it work?!

There are quite a few links on the net that advertise as drivers for this particular model, but none of them worked for me. And in fact, the majority of them were in fact mislabeled v1 or v3 drivers.

Knowing, however, that what really matters is the chipset, I established that this particular device sports a Realtek RTL8187B chipset and went over to Realtek's website (RTL8187B

@inequation
inequation / Declutter.ps1
Last active April 22, 2017 18:19
Simple script to remove all the Windows 10 default useless apps bovine feces, with a few exceptions for the useful ones.
taskkill /f /im OneDrive.exe
& "$env:SystemRoot\SysWOW64\OneDriveSetup.exe" /uninstall
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
Get-AppxPackage *windowsalarms* | Remove-AppxPackage
#Get-AppxPackage *windowscalculator* | Remove-AppxPackage
Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *windowscamera* | Remove-AppxPackage
Get-AppxPackage *officehub* | Remove-AppxPackage
#Get-AppxPackage *skypeapp* | Remove-AppxPackage
Get-AppxPackage *getstarted* | Remove-AppxPackage