Skip to content

Instantly share code, notes, and snippets.

@mburr
mburr / Cmods.md
Created August 28, 2021 08:21 — forked from Zaryob/Cmods.md

awesome-c

A curated list of awesome C frameworks, libraries and software.

  • git/git - Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
  • SamyPesse/How-to-Make-a-Computer-Operating-System - How to Make a Computer Operating System in C++
  • ggreer/the_silver_searcher - A code-searching tool similar to ack, but faster.
  • grpc/grpc - The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)
  • bang590/JSPatch - JSPatch bridge Objective-C and Javascript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. JSPatch is generally used to hotfix iOS App.
  • [FFmpeg/FFmpeg](https://github.com/
@mburr
mburr / googlemonkeyr.user.js
Last active January 14, 2018 02:55
mburr / GoogleMonkeyR - gist to allow patching the now unsupported script
// ==UserScript==
// @author mungushume
// @version 1.7.3.2
// @name GoogleMonkeyR
// @namespace http://www.monkeyr.com
// @description Google - Multiple columns of results, Remove "Sponsored Links", Number results, Auto-load more results, Remove web search dialogues, Open external links in a new tab, self updating and all configurable from a simple user dialogue.
// @include http://www.google.*/webhp?*
// @include http://www.google.*/search?*
// @include http://www.google.*/ig?*
// @include http://www.google.*/
@mburr
mburr / whiteboardCleaner.md
Last active August 29, 2015 14:27 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@mburr
mburr / parse-fname
Last active August 29, 2015 14:06
mburr / bash parse-fname
#!/bin/bash
#
# find latest version here: https://gist.github.com/mburr/eac741ea7425fbea837f
#
# adapted from http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
function parse-fname()
{
# parse a filename into path, base file (without extension), and extension
# Which of these compenents is returned is determined by the specified option:
@mburr
mburr / addpath
Created June 2, 2014 20:11
mburr / bash addpath function
function addpath() {
if [[ ":$PATH:" != *":$1:"* ]]; then
PATH="${PATH:+"$PATH:"}$1"
export PATH
fi
}
@mburr
mburr / prtpath.c
Created June 2, 2014 18:19
mburr / prtpath.c
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#ifndef _WIN32
/*
get strdup() and strtok_r() from other snippets if needed
*/
@mburr
mburr / so20477424.c
Last active December 30, 2015 20:38
A test for the answer to http://stackoverflow.com/questions/20477424/efficient-way-to-find-the-sum-of-digits-of-an-8-digit-number Stackoverflow question: "Efficient way to find the sum of digits of an 8 digit number"
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
/*
@mburr
mburr / 0_reuse_code.js
Created October 11, 2013 17:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mburr
mburr / getline_until.cpp
Last active December 12, 2015 00:08
getline_until = #mburr A version of getline() that takes a predicate to determine the delimiter. Some overloads provided that take a list of characters as delimiters (like strtok()) From an SO answer: http://stackoverflow.com/a/9273019/12711
#include <functional>
#include <iostream>
#include <string>
using namespace std;
template <typename Predicate>
istream& getline_until( istream& is, string& str, Predicate pred)
{
bool changed = false;
@mburr
mburr / SupressUppercaseConversion.reg
Created September 17, 2012 20:46
reg file to configure VS2012 to use normal menus - mburr #cmd
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General]
"SuppressUppercaseConversion"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\VWDExpress\11.0\General]
"SuppressUppercaseConversion"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\VSWinExpress\11.0\General]
"SuppressUppercaseConversion"=dword:00000001