Skip to content

Instantly share code, notes, and snippets.


Brian Shirai brixen

View GitHub Profile
hez / estimation.markdown
Last active Dec 12, 2018
On Estimating
View estimation.markdown

On Estimating

Charlie Tanksley

Has anyone ever worked somewhere that was good at setting timelines for shipping software (implied in ‘good’ means hit the timelines)?

Steve Wan

I have Charlie. :)

jakubfiala / directories_model.graphql
Last active Nov 1, 2017
Example of creating data schemae using Google's protocol buffers and Facebook's GraphQL Schema Language
View directories_model.graphql
# this defines a new field type
scalar HTML
# this defines a new object type
type Institution {
# the ! denotes a required field
name: String!
location: String
bitwalker / config.ex
Created Jul 19, 2016
Useful config wrapper for Elixir
View config.ex
defmodule Config do
@moduledoc """
This module handles fetching values from the config with some additional niceties
@doc """
Fetches a value from the config, or from the environment if {:system, "VAR"}
is provided.
An optional default value can be provided if desired.
bmhatfield / .profile
Last active Oct 12, 2020
Automatic Git commit signing with GPG on OSX
View .profile
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
View gist:090e43d8eb987adb7d20
17:23 Topic: Join us on Gitter! : install Rubinius - : logs -
17:23 brixen set the topic at: Jan 5, 2016, 1:34 PM
17:23 ***: Buffer Playback...
17:23 average: [16:49:41] guys..girls.. you're nuts
17:23 average: [16:49:44]
17:23 average: [16:49:55] I read this I was like wuut ?
17:23 average: [16:50:12] your CoC crap is getting out of hand
17:23 average: [16:50:26] and btw I'm a complete outsider
17:23 average: [16:51:18] your CoC and rules, you're doing it completely wrong, and you're buying in on all the CoC crap out there
17:23 average: [16:51:49] I would definitely never recommend anyone join your project because of this type of behaviour
Last active Sep 19, 2020
Working around offsetof limitations in C++

Working around offsetof limitations in C++:

There is sometimes a situation in which one needs to get the relative offset of a structure field, common examples of this include serialization frameworks which aid to serialize objects, vertex attributes for rendering (D3D, GL.), etc.

The most common technique for getting this information is through the offsetof macro defined in stddef.h. Unfortunately using the macro in C++ comes with a new set of restrictions that prevent some (subjectively valid) uses of it.

View packet_port.ex
cmd = ~S"""
ruby -e '
STDOUT.sync = true
def receive_input
encoded_length =
return nil unless encoded_length
length = encoded_length.unpack("N").first
View Rubinius at Monmouth Telecom
At Monmouth Telecom we provide high-availability cloud based telephone systems for medium to large companies. Because
we have written our own code in Ruby it is easy for us to customize or add additional features at the request of customers,
often at no charge, and that is key to our business.
Several years ago our engineering team developed a real time display panel for managers and operators alike that kept people
abreast of the status of phone extensions, conference bridges, and call queues, as well as allowing a variety of call control
features. We wrote this in ruby so that it would be easy to extend. The web display panel accesses customer data through
Active Record and is based on HTML5 with canvas and web sockets so it doesn’t require setup on the customer site.
Unsurprisingly it was one our more popular features and so we immediately started monitoring Rubinius as our migration path
for the day when one core of our 8 processor cores would become insufficient to meet demand. Well earlier this year
View curl commands
$ curl -kvv --tlsv1.2
* Trying
* Connected to ( port 4567 (#0)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
You can’t perform that action at this time.