Skip to content

Instantly share code, notes, and snippets.

View vespakoen's full-sized avatar

Koen Schmeets vespakoen

View GitHub Profile
@vespakoen
vespakoen / slvs.h
Last active February 27, 2023 21:31
slvs experiment
typedef struct {
char type;
const char *desc;
char fmt;
void *ptr;
} SaveTable;
struct {
Group g;
EntityBase e;
#ifndef SOLVESPACE_SKETCH_H
#define SOLVESPACE_SKETCH_H
#include <stdexcept>
#include "data.h"
#include "idlist.h"
#include "group.h"
#include "vector.h"
#include "quaternion.h"
@vespakoen
vespakoen / install_steam
Created April 21, 2015 22:03
install steam & age of empires 2 HD on ubuntu 14.04
# install wine 1.7
add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7
# download steam
curl -o ~/Downloads/SteamSetup.exe http://media.steampowered.com/client/installer/SteamSetup.exe
# install some tricks
winetricks vcrun2010
@vespakoen
vespakoen / esnextbin.md
Created January 22, 2019 00:58
esnextbin sketch
function safeRun(code: string) {
const safeCode = `(function () { try { ${code}
} catch (err) {
function errorToPretty (err) {
var stack = $.stack.split('\\n')
stack.shift()
stack.pop()
stack.pop()
var lines = (err.source && err.source.split('\\n')) || []
err.line--;
iwconfig
IWCONFIG(8) Linux Programmer’s Manual IWCONFIG(8)
NAME
<?php
namespace Spatial;
use CrEOF\Spatial\DBAL\Types\BinaryParser;
use CrEOF\Spatial\PHP\Types\Geometry\LineString;
use CrEOF\Spatial\PHP\Types\Geometry\Point;
class GeometryParser {
@vespakoen
vespakoen / gist:7770406
Last active December 30, 2015 03:39
array_pluck
<?php
/**
* Pluck an array of values from an array.
*
* @param array $array
* @param string $value
* @param string $key
* @return array
*/
function array_pluck($array, $value = null, $key = null)
@vespakoen
vespakoen / menu_stuff.php
Created September 3, 2013 09:36
What's on the menu?
<?php
namespace Illuminate\Support;
use Closure;
use Countable;
use ArrayAccess;
use ArrayIterator;
use IteratorAggregate;
@vespakoen
vespakoen / aliases
Created August 9, 2013 09:42
Git status / diff for subfolders
alias gds='dir=`pwd`; for f in `ls -d */`; do echo "\nRunning git status for: $f" && cd $dir/$f && git --no-pager status; done; cd $dir'
alias gdd='dir=`pwd`; for f in `ls -d */`; do echo "\nRunning git diff for: $f" && cd $dir/$f && git --no-pager diff; done; cd $dir'