Skip to content

Instantly share code, notes, and snippets.

View jaredsmith's full-sized avatar

Jared Smith jaredsmith

View GitHub Profile
#include <locale.h>
#include <stdlib.h>
#include <libsmartcols.h>
#include <solv/policy.h>
#include <solv/pool.h>
#include <solv/poolarch.h>
#include <solv/repo.h>
#include <solv/repo_solv.h>
#include <solv/selection.h>
@stevekm
stevekm / pdf_conversions.md
Last active June 29, 2023 01:13
Commands to convert multi-page PDF to/from multiple PNG files with GhostScript & ImageMagick
@ikonst
ikonst / gst.py
Last active August 29, 2015 14:14
GStreamer extensions for LLDB
# To use:
# 1) Save to $HOME
# 2) echo 'command script import ~/gst.py' >> ~/.lldbinit
# 3) From within lldb:
#
# To open pipeline graph in Graphviz:
#
# gst_dot foobar
#
# foobar: any expression of type GstObject* -- e.g. GstElement*, GstPad* or GstBin*
@brendannee
brendannee / gist:7196251
Created October 28, 2013 12:48
Whitelist a Wordpress custom post type for use with the Jetpack JSON API using the `rest_api_allowed_post_types` filter. See http://developer.wordpress.com/docs/api/1/get/sites/%24site/posts/
function allow_my_post_types($allowed_post_types) {
$allowed_post_types[] = 'my_post_type';
return $allowed_post_types;
}
add_filter( 'rest_api_allowed_post_types', 'allow_my_post_types');
@ssylvan
ssylvan / rh_hash_table.hpp
Last active January 12, 2023 04:52
Quick'n'dirty Robin Hood hash table implementation. Note, I have implemented this algorithm before, with tons of tests etc. But *this* code was written specifically for the blog post at http://sebastiansylvan.com/post/robin-hood-hashing-should-be-your-default-hash-table-implementation/, it has not been extensively tested so there may be bugs (an…
#define USE_ROBIN_HOOD_HASH 1
#define USE_SEPARATE_HASH_ARRAY 1
template<class Key, class Value>
class hash_table
{
static const int INITIAL_SIZE = 256;
static const int LOAD_FACTOR_PERCENT = 90;
struct elem
@t2-support-gists
t2-support-gists / CMS.php
Created September 14, 2012 18:08
CMS Php RESTFul App 1
<?php require 'index.php'; ?>