Skip to content

Instantly share code, notes, and snippets.

View camconn's full-sized avatar

Cameron Conn camconn

View GitHub Profile
@zed
zed / dp.py
Last active January 19, 2022 00:24
Find height, width of the largest rectangle containing all 0's in the matrix
#!/usr/bin/env python
"""Find height, width of the largest rectangle containing all 0's in the matrix.
The algorithm for `max_size()` is suggested by @j_random_hacker [1].
The algorithm for `max_rectangle_size()` is from [2].
The Python implementation [3] is dual licensed under CC BY-SA 3.0
and ISC license.
[1]: http://stackoverflow.com/questions/2478447/find-largest-rectangle-containing-only-zeros-in-an-nn-binary-matrix#comment5169734_4671342
@EmilHernvall
EmilHernvall / bigdecoder.py
Created May 3, 2011 18:54
Decoder for EA games .big-files
# bigdecoder.py, by [email protected], 2009-03-01
#
# decoder for .BIG-format files utilized by Red Alert 3 and C&C: Zero Hours
# among others. .big is a trivial archival format. quite frankly, this is
# probably the simplest compound file format imaginable.
#
# this script is written for microsoft windows. it can probably be easily
# adapted for other platforms, but i haven't tried.
#
# file structure:
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

obj-m += rootkit.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@esfand
esfand / finaldeser.md
Last active July 8, 2019 06:14
Java Final Field Deserialization with readobject

Java Serialization & final class attributes

The SmartWeb BusinessObject class defines a protected attribute named logger carrying the logger for subclasses. The BusinessObject class implements Serializable thus it needs to define the logger attribute as transient because Commons Logging loggers are non serializable.

The problem arises whenever you deserialize a BusinessObject subclass because the logger attribute will not be deserialized (it has not be serialized at all!)

@kuanting
kuanting / svm_classifier.cpp
Created August 31, 2014 22:33
Using LIBSVM with OpenCV Mat
#include "svm.h"
#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/ml/ml.hpp"
#include <iostream>
using namespace cv;
using namespace std;
@ageis
ageis / openpgp-card-guide.md
Last active November 6, 2024 14:28
Quick GPG Smartcard Guide
@DmitrySoshnikov
DmitrySoshnikov / lr0-items.js
Last active February 15, 2023 14:56
LR Parsing: Canonical collection of LR(0) items
/**
* LR-parsing.
*
* Canonical collection of LR(0) items.
*
* by Dmitry Soshnikov <[email protected]>
* MIT Style License (C) 2015
*
* See this "rock-painting" to get the picture of what we're building here:
*
@sagotsky
sagotsky / .Xresources
Created February 27, 2016 02:31
urxvt copy to global clipboard
URxvt.perl-ext-common: font-size,selection-to-clipboard
URxvt.clipboard.autocopy: true
URxvt.clipboard.copycmd: xclip -in -selection clipboard
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 20, 2025 23:02
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security