Skip to content

Instantly share code, notes, and snippets.

struct myStruct *p = &myStructs[0]; // Create a pointer to the first array element
for (uint8_t i = 0; i != N_ELEMENTS; i++) {
print_f(p->value); // Access the struct
p++; // Advance the pointer
}
/*
* CustomTextFieldConverter.cs
*
* Author:
* Hylke Bons <hylbo@microsoft.com>
*
* Copyright (C) 2020 Microsoft, Corp
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
// View: detailsTextView
// NodeName: "detailsTextView"
// NodeType: INSTANCE
// NodeId: 10:470
var detailsTextViewScrollView = new AppKit.NSScrollView();
detailsTextViewScrollView.WantsLayer = true;
detailsTextViewScrollView.BorderType = NSBorderType.LineBorder;
detailsTextViewScrollView.HasHorizontalRuler = false;
detailsTextViewScrollView.HasVerticalScroller = true;
-- Skipping Git LFS
-- Adding CA bundle
-- Removing server-side programs
-- Removing unsupported features
-- Static linking research
File: ./libexec/git-core/git-http-fetch
0x0000000000000001 (NEEDED) Shared library: [libcurl.so.4]
0x0000000000000001 (NEEDED) Shared library: [libz.so.1]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
@hbons
hbons / gist:8b9af01653f991f966ec6a3672259b6c
Created April 2, 2018 09:29
An example DNS file for GitLab custom domains
* 600 IN A 52.167.214.135
@ 600 IN A 52.167.214.135
_gitlab-pages-verification-code 600 IN TXT "gitlab-pages-verification-code=VERIFICATION_CODE"
_gitlab-pages-verification-code.www 600 IN TXT "gitlab-pages-verification-code=VERIFICATION_CODE"

Source Code Typography

Presentation: http://www.slideshare.net/vancura/source-code-typography

Quotes

Dumb quotes (also known as straight quotes) are straight and vertical. Proper typography never uses straight quotes. They are left over from the age of typewriters and their only modern use is for coding.

Cleaning up
Commiting stage cleanup to cache
(xdg-app-builder:3540): xdg-app-WARNING **: Can't load metadata file metadata.app: Error opening file: No such file or directory
Finishing app
error: Error when getting information for file '/home/hbons/Projects/sparkleshare-xdg-app/metadata.app': No such file or directory
@hbons
hbons / gist:7691352
Last active December 29, 2015 15:29
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/0.10.10/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install' ]
2 info using npm@1.2.25
3 info using node@v0.10.10
4 verbose read json /Users/hbons/Desktop/Red Hat/AeroGear/aerogear-unifiedpush-server-admin-ui/package.json
5 verbose readDependencies using package.json deps
6 verbose install where, deps [ '/Users/hbons/Desktop/Red Hat/AeroGear/aerogear-unifiedpush-server-admin-ui',
6 verbose install [ 'grunt',
> phantomjs@1.9.2-4 install /Users/hbons/Desktop/Red Hat/AeroGear/aerogear-unifiedpush-server-admin-ui/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs
> node install.js
Downloading http://phantomjs.googlecode.com/files/phantomjs-1.9.2-macosx.zip
Saving to /var/folders/vs/f1vpmwmx54scny8crp406wz40000gn/T/phantomjs/phantomjs-1.9.2-macosx.zip
Receiving...
Error requesting archive
Phantom installation failed [Error: Error with http request: { 'content-type': 'text/html',
'content-length': '513',
connection: 'close',
generated.c: In function 'webkitsharp_webkit_dombarinfo_get_parent_instance_offset':
generated.c:19:2: error: unknown type name 'WebKitDOMBarInfo'
return (guint)G_STRUCT_OFFSET (WebKitDOMBarInfo, parent_instance);
^
generated.c: In function 'webkitsharp_webkit_dommemoryinfo_get_parent_instance_offset':
generated.c:851:2: error: unknown type name 'WebKitDOMMemoryInfo'
return (guint)G_STRUCT_OFFSET (WebKitDOMMemoryInfo, parent_instance);
^
make[1]: *** [generated.lo] Error 1
make[1]: Leaving directory `/home/hylke/Projects/webkitgtk-sharp/sources/glue'