Skip to content

Instantly share code, notes, and snippets.

View blockspacer's full-sized avatar
:octocat:

Devspace blockspacer

:octocat:
  • Google
  • USA
View GitHub Profile
// g++ `pkg-config cairo-ft --cflags --libs` -lglut main.cpp
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
#ifdef _MSC_VER
#include <windows.h>
#include <cairo.h>
#pragma comment(lib, "cairo.lib")
/*
* g++ -lboost_system -lboost_iostreams -lboost_regex -lpthread -fPIC -g -shared -Wl,-soname,libnss_openvpn.so.2 -o /lib/libnss_openvpn.so.2 libnss_openvpn.cpp
*/
#include <string.h>
#include <nss.h>
#include <iostream>
#include <vector>
#include <map>
#include <boost/asio.hpp>
@pazdera
pazdera / builder.cpp
Created August 2, 2011 20:33
Example of `builder' design pattern in C++
/*
* Example of `builder' design pattern.
* Copyright (C) 2011 Radek Pazdera
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@aghuddleston
aghuddleston / DateFormatBugfix.txt
Created August 8, 2012 19:03
Ext JS 4 Grid Search Plugin originally by Saki and ported by Nathan LeBlanc for Ext JS 4
One bugfix
http://www.sencha.com/forum/showthread.php?23615-Grid-Search-Plugin&p=799141&viewfull=1#post799141
For datecolumns like:
,{
text:'date',
dataIndex:'datecreated',
xtype:'datecolumn',
format:'d.m.Y H:i'
}
@grd
grd / float128.go
Created November 10, 2012 05:46
Simplified float128, more in style with the math package
// This package implements 128-bit ("double double") floating point using
// a pair of 64-bit hardware floating point values and standard hardware
// floating point operations. It is based directly on libqd by Yozo Hida,
// Xiaoye S. Li, David H. Bailey, Yves Renard and E. Jason Riedy. Source:
// http://crd.lbl.gov/~dhbailey/mpdist/qd-2.3.13.tar.gz
package float128
import (
"errors"
"fmt"
@jgranick
jgranick / .htaccess
Last active June 3, 2019 14:19
SimpleGL
SetOutputFilter DEFLATE
@lukehorvat
lukehorvat / excel-grid-plugin.js
Last active June 20, 2024 00:09
An Ext JS 4 grid plugin that provides Microsoft Excel-esque cell navigation and editing via keyboard.
var newGridCellValue = '',
deleteGridCellValue = false;
Ext.define('ExcelCellEditing', {
extend: 'Ext.grid.plugin.CellEditing',
alias: 'plugin.excelcellediting',
initEditTriggers: function () {
var me = this;
@Starefossen
Starefossen / tmux-cheats.md
Last active July 20, 2024 15:33
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@rxaviers
rxaviers / gist:7360908
Last active July 25, 2024 14:32
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sr105
sr105 / qpropertymodel.cpp
Last active April 2, 2019 05:05
QPropertyModel class for easily turning any QObject-derived subclass with properties into a one-row model.
// QPropertyModel
// - a class for easily turning any QObject-derived subclass with properties into a one-row model
//
// Copyright 2013 - Harvey Chapman <hchapman@3gfp.com>
// Source: https://gist.github.com/sr105/7955969
// License:
// This work is licensed under the Creative Commons Attribution-ShareAlike
// 4.0 International License. To view a copy of this license, visit
// http://creativecommons.org/licenses/by-sa/4.0/deed.en_US.
//