Skip to content

Instantly share code, notes, and snippets.

View Slyracoon23's full-sized avatar

Earl Potters Slyracoon23

View GitHub Profile
#!/usr/bin/env python
'''Crop an image to just the portions containing text.
Usage:
./crop_morphology.py path/to/image.jpg
This will place the cropped image in path/to/image.crop.png.
For details on the methodology, see
@Nixes
Nixes / libserialport example.c
Last active February 25, 2021 02:55
libserialport example
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <unistd.h> // for sleep function
#include <libserialport.h> // cross platform serial port lib
const char* desired_port = "COM8";
@sevaine
sevaine / VMWare-Fusion-OSX-Yosemite-default-VM-Path-change.md
Created September 19, 2015 09:10
Changing the default VM Path in VMWare Fusion on OSX Yosemite

Changing the default VM Path in VMWare Fusion on OSX Yosemite:

I had a little trouble figuring this out - so making a note of it. The VMWare Fusion default location for VMs is ~/Documents/Virtual Machines.localized, which doesnt work well for me as I typically have Documents symbolically linked to my Dropbox directory and prefer to move the default VM location rather than manage exclusions on every Dropbox install I have.

It's relatively straightforward on VMWare Workstation, and Oracle VirtualBox - but for some reason

@jatindhankhar
jatindhankhar / bfs.cpp
Last active February 23, 2022 22:26
Simple BFS implementation in modern C++
//Modified version of http://www.geeksforgeeks.org/breadth-first-traversal-for-a-graph/
# include <iostream>
# include <algorithm>
# include <vector>
# include <list>
using namespace std;
class Graph
{
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 27, 2024 20:46
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@rtt
rtt / tinder-api-documentation.md
Last active May 5, 2024 15:28
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@manudatta
manudatta / bubblesort.mips.s
Created December 14, 2012 08:34
Bubble sort in MIPS assembly.
# Copyright 2002 Manu Datta (gmail.com ID Manu dot Datta)
# All rights reserved
.data
msg1: .asciiz "\nEnter integer values followed by return (-1 terminates input): \n"
msg2: .asciiz ","
msg3: .asciiz "Bubble Sort"
msg4: .asciiz "#########pass#########"
msg5: .asciiz "\n"
msg6: .asciiz "\nNumber list has been sorted\n"
@dcalacci
dcalacci / factorial.asm
Created September 19, 2012 03:35
simple factorial program in MIPS assembly
.globl main
.data
msgprompt: .word msgprompt_data
msgres1: .word msgres1_data
msgres2: .word msgres2_data
msgprompt_data: .asciiz "Positive integer: "
msgres1_data: .asciiz "The value of factorial("
msgres2_data: .asciiz ") is "
@micrypt
micrypt / gist:1207324
Created September 9, 2011 20:59
Fix silly "Networking Disabled" issue (Ubuntu 10.04)
su root
# Don't you hate when you need to root to fix dumb issues?
service network-manager stop
rm /var/lib/NetworkManager/NetworkManager.state
service network-manager start
reboot -h now