Skip to content

Instantly share code, notes, and snippets.

@minio
minio / sample database
Created September 6, 2013 21:59
Sample database populated with random set of data, created to follow one of answers to my [reddit question](http://www.reddit.com/r/learnprogramming/comments/1lqj09/sql_i_need_to_practice_any_sample_databases_with/)
-- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: purchases
-- ------------------------------------------------------
-- Server version 5.5.31-1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@minio
minio / gist:6982551
Created October 14, 2013 21:30
query to get all posts and associated categories from Wordpress database
$all_posts = $wpdb->get_results("
SELECT wp_posts.ID,wp_posts.post_date,wp_posts.post_title,wp_posts.post_name,
wp_terms.name,wp_terms.slug,wp_term_taxonomy.description
from wp_posts
join wp_term_relationships on wp_posts.ID = wp_term_relationships.object_id
join wp_terms on wp_term_relationships.term_taxonomy_id = wp_terms.term_id
join wp_term_taxonomy on wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE wp_posts.post_status = 'publish'
ORDER BY wp_terms.slug,wp_posts.ID;
", ARRAY_A);
@minio
minio / gdbtrace.log
Created October 24, 2013 16:23
backtrace from LO 4.1.2 crash
warning: Currently logging to gdbtrace.log. Turn the logging off and on to make the new setting effective.
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe8476700 (LWP 23322)]
[New Thread 0x7fffd89a0700 (LWP 23345)]
[New Thread 0x7fffd37c7700 (LWP 23350)]
[Thread 0x7fffd89a0700 (LWP 23345) exited]
@minio
minio / stayfocusd-gdb.txt
Created November 14, 2014 19:24
backtrace from Stayfocusd crash
Starting program: /usr/lib/chromium/chromium --ssl-version-min=tls1 --ppapi-flash-path=/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so --ppapi-flash-version=15.0.0.189
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffea405700 (LWP 2307)]
[New Thread 0x7fffe9c04700 (LWP 2325)]
[New Thread 0x7fffe3fff700 (LWP 2328)]
[New Thread 0x7fffe37fe700 (LWP 2329)]
[New Thread 0x7fffe2ffd700 (LWP 2336)]
[New Thread 0x7fffe27fc700 (LWP 2340)]
[New Thread 0x7fffe84e0700 (LWP 2344)]
subUnitIndex := "1"
deviceType := "playback"
changeTrayIcon() {
muteSetting := VA_GetMute(subUnitIndex, deviceType)
icon := ""
if (muteSetting) {
icon := "off"
} else {