Skip to content

Instantly share code, notes, and snippets.

@alexcjohnson
alexcjohnson / LICENSE
Last active June 29, 2025 17:42
Working with React and D3 together
The MIT License (MIT)
Copyright (c) Plotly, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@maximpertsov
maximpertsov / CollectionToString.bas
Last active August 22, 2023 15:46
Join VBA collection items into a string
Function CollectionToString(C As Collection, Optional Delimiter As String, Optional TrailingDelimiter As Boolean) As String
' Join a collection into a single string
' OPTIONAL: choose delimiter and specify whether to include a trailing delimiter (e.g. "a;b;c" vs "a;b;c;", where ";" is the delimiter)
' Transfer collection to array
CollectionToString = Join(CollectionToArray(C, 0, C.Count + IIf(TrailingDelimiter, 1, 0)), Delimiter) ' See Referenced Gists below
End Function
Function CollectionToArray(C As Collection, Optional StartIdx As Long, Optional Size As Long) As Variant
@matthewtole
matthewtole / httpebble-simple.c
Last active December 19, 2015 18:59
An incredibly basic Pebble app that uses httpebble.
#include "pebble_os.h"
#include "pebble_app.h"
#include "pebble_fonts.h"
#include "http.h"
/* If compiling this for iOS, set ANDROID to be false. */
#define ANDROID true
#if ANDROID
#define MY_UUID { 0x91, 0x41, 0xB6, 0x28, 0xBC, 0x89, 0x49, 0x8E, 0xB1, 0x47, 0x10, 0x34, 0xBF, 0xBE, 0x12, 0x98 }
...
gem 'devise',
:git => 'https://github.com/plataformatec/devise.git',
:branch => 'omniauth'
gem 'oa-oauth', :require => 'omniauth/oauth'
...
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created November 5, 2010 09:29
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")