Skip to content

Instantly share code, notes, and snippets.

View chergert's full-sized avatar
💭
I'm on GitLab https://gitlab.gnome.org/chergert

Christian Hergert chergert

💭
I'm on GitLab https://gitlab.gnome.org/chergert
View GitHub Profile
@chergert
chergert / script1.js
Last active August 29, 2015 14:15
Quick example of custom search provider in LibIDE (GNOME Builder)
/* ~/.config/gnome-builder/scripts/script1.js */
const Ide = imports.gi.Ide;
const GObject = imports.gi.GObject;
/* just some examples of things you can access */
let Project = Context.get_project();
let BuildSystem = Context.get_build_system();
let Vcs = Context.get_vcs();
@chergert
chergert / build.log
Created February 5, 2015 21:23
libide managed to build something
[christian@starfield gnome-builder]$ ../libide/ide-build configure.ac
Build System: IdeAutotoolsBuildSystem
VCS: IdeGitVcs
Using device: IdeLocalDevice (x86_64-linux-gnu)
Build started.
Building into: /home/christian/.cache/libide/builds/gnome-builder/local/x86_64-linux-gnu
== Ensuring build directories are created.
== Checking if autogen.sh needs to be run.
== Checking if configure needs to be run.
checking whether NLS is requested... yes
@chergert
chergert / builder.stacktrace
Created February 4, 2015 00:38
why thank you libgit2.
#0 0x00007ffff185c830 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1 0x00007ffff2933d8c in attr_cache_lock (cache=0x0) at /home/christian/Projects/libgit2-0.21.2/src/attrcache.c:14
#2 0x00007ffff2934307 in attr_cache_lookup (out_file=0x7fffd2ffc390, out_entry=0x7fffd2ffc398, repo=0x7fffc8006090, source=GIT_ATTR_FILE__FROM_FILE, base=0x7fffc8008ba0 "/home/christian/Projects/libide/", filename=0x7fffc8008d00 "/home/christian/Projects/libide/.gitattributes")
at /home/christian/Projects/libgit2-0.21.2/src/attrcache.c:175
#3 0x00007ffff293441f in git_attr_cache__get (out=0x7fffd2ffc3f0, repo=0x7fffc8006090, source=GIT_ATTR_FILE__FROM_FILE, base=0x7fffc8008ba0 "/home/christian/Projects/libide/", filename=0x7ffff2973180 ".gitattributes", parser=0x7ffff290fcec <git_attr_file__parse_buffer>)
at /home/christian/Projects/libgit2-0.21.2/src/attrcache.c:209
#4 0x00007ffff28d3682 in push_attr_file (repo=0x7fffc8006090, list=0x7fffd2ffc5b0, source=GIT_ATTR_FILE__FROM_FILE, base=0x7fffc8008ba0 "/home/ch
@chergert
chergert / yak.h
Created January 27, 2015 20:16
clear/set weak pointer helpers
#define ide_clear_weak_pointer(ptr) \
(*(ptr) ? (g_object_remove_weak_pointer((GObject*)*(ptr), (gpointer*)ptr),1) : 0)
#define ide_set_weak_pointer(ptr,obj) \
((obj!=*(ptr)) ? (ide_clear_weak_pointer(ptr),*(ptr)=obj,g_object_add_weak_pointer((GObject*)obj, (gpointer*)ptr),1) : 0)
using Gtk;
namespace Chimera
{
public class ChimeraTab : Gtk.Bin
{
ScrolledWindow scroller;
TextView text_view;
construct {
@chergert
chergert / uber-build.sh
Created June 13, 2014 02:20
install mongo-c-driver on Ubuntu 14.04 with packages from git.
#!/usr/bin/env bash
sudo apt-get install gcc dpkg-dev cdbs automake autoconf libtool make libssl-dev libsasl2-dev git python-lxml pkg-config
git clone git://github.com/mongodb/mongo-c-driver.git
cd mongo-c-driver
./build/mci.sh --notest
cd ..
sudo dpkg --install libmongoc-*.deb libbson-*.deb

Keybase proof

I hereby claim:

  • I am chergert on github.
  • I am hergertme (https://keybase.io/hergertme) on keybase.
  • I have a public key whose fingerprint is 9018 D71E E3E7 F68A 8613 A713 34D1 9DFA F522 9486

To claim this, I am signing this object:

@chergert
chergert / signames.c
Created April 1, 2014 16:31
print names of signal numbers.
#include <signal.h>
#include <stdio.h>
#include <string.h>
int
main (int argc,
char *argv[])
{
const char *str;
int i;
@chergert
chergert / TUTORIAL.md
Last active April 10, 2020 14:27
Getting Started with the MongoDB C Driver

Getting started with C Driver

Introduction

This page provides you with a little help getting started with the new MongoDB C driver.

For more information on the C API, please refer to the online API Documentation for the C driver.

@chergert
chergert / gist:9659010
Created March 20, 2014 07:39
fig is a tool to manage automake projects. its a work in progress and barely does anything yet but boostrap.
[christian@stardust ~]$ mkdir foobar
[christian@stardust ~]$ cd foobar/
[christian@stardust foobar]$ fig init --help
Usage:
fig init [OPTION...]
Initialize a new autotools project.
Help Options:
-h, --help Show help options