Skip to content

Instantly share code, notes, and snippets.

View ron-wolf's full-sized avatar
🙌
Open for work!

Ron Wolf ron-wolf

🙌
Open for work!
View GitHub Profile
@jhrr
jhrr / Functional Core, Imperative Shell
Last active January 8, 2018 16:11
Notes and links for ideas about Gary Bernhardt's "functional core, imperative shell"
http://www.infoq.com/presentations/Simple-Made-Easy
http://www.infoq.com/presentations/integration-tests-scam
http://blog.thecodewhisperer.com/2010/09/14/when-is-it-safe-to-introduce-test-doubles
http://youtu.be/yTkzNHF6rMs
http://pyvideo.org/video/1670/boundaries
http://skillsmatter.com/podcast/ajax-ria/enumerators
http://alistair.cockburn.us/Hexagonal+architecture
http://c2.com/cgi/wiki?PortsAndAdaptersArchitecture
http://www.confreaks.com/videos/977-goruco2012-hexagonal-rails
http://www.confreaks.com/videos/1255-rockymtnruby2012-to-mock-or-not-to-mock
@datagrok
datagrok / vendoring.md
Last active November 3, 2023 17:37
"Vendoring" is a vile anti-pattern

"Vendoring" is a vile anti-pattern

What is "vendoring"?

From a comment on StackOverflow:

Vendoring is the moving of all 3rd party items such as plugins, gems and even rails into the /vendor directory. This is one method for ensuring that all files are deployed to the production server the same as the dev environment.

The activity described above, on its own, is fine. It merely describes the deployment location for various resources in an application.

NOTE: This was first authored on 26 Feb 2014. Things may have changed since then.

C++'s Templates

C++'s templates could be seen as forming a duck typed, purely functional code generation program that is run at compile time. Types are not checked at the initial invocation stage, rather the template continues to expand until it is either successful, or runs into an operation that is not supported by that specific type – in that case the compiler spits out a 'stack trace' of the state of the template expansion.

To see this in action, lets look at a very simple example:

template 
@vedant
vedant / gist:9333992
Last active May 22, 2024 16:09
Export note files from Google Keep
/* Vedant Misra (vedantmisra.com) (github.com/vedant)
*
* Script for exporting Google Keep note files.
*
* This does not handle attachments or checklists, only note files. Downloads
* each note to a .txt file named for the note's title.
*
* To use this, go to https://drive.google.com/keep/ and wait for the page to
* fully load all of your saved notes; scroll to the bottom to confirm they're
* loaded. Then paste the below in your URI bar, go to the start of the line,
struct Node {
shared_ptr<Node> parent;
shared_ptr<Node> first_child;
TextNode* as_text_node() { assert(/*sensible check*/); return (TextNode*)this; }
virtual Element* as_element() { return NULL; }
};
struct TextNode: public Node {
};
@wbthomason
wbthomason / UVa: CS Courses and Programming Languages.md
Last active July 21, 2022 00:37
UVa: CS Courses and Programming Languages

This is only my personal opinion, and other TAs probably will differ/should also post their opinions.

Java and C++ are really very similar. Java is more strictly object oriented than C++, and C++ lets the programmer have more low-level control (or rope with which to hang themselves, depending on how you look at it), but the paradigms they enforce are largely the same. So, when considering a new language to learn, we really have to consider what we'll get out of it - what about the language makes it worth learning. There are a few factors here. First, as the student answers have mentioned, the practicality of a language is important. If knowing a language might be necessary to get you a good job or to allow you to contribute meaningfully to a large open-source project, it might be a good idea to learn it. Second, you also need to look at how the language can help you in a larger sense. Does it use a unique paradigm, or one you haven't encountered before? Can it introduce you to new ways of thinking about and

@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@benmccormick
benmccormick / minimal.vim
Last active February 26, 2022 17:09
A minimal vimrc for new vim users
" A minimal vimrc for new vim users to start with.
"
" Referenced here: http://vimuniversity.com/samples/your-first-vimrc-should-be-nearly-empty
"
" Original Author: Bram Moolenaar <Bram@vim.org>
" Made more minimal by: Ben Orenstein
" Modified by : Ben McCormick
" Last change: 2014 June 8
"
" To use it, copy it to
@staltz
staltz / introrx.md
Last active June 2, 2024 11:03
The introduction to Reactive Programming you've been missing
@trusktr
trusktr / DefaultKeyBinding.dict
Last active May 21, 2024 19:41
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers