Skip to content

Instantly share code, notes, and snippets.

View dvcarter's full-sized avatar
🎯
Focusing

desmond v. carter dvcarter

🎯
Focusing
  • michigan
View GitHub Profile
@staltz
staltz / introrx.md
Last active May 20, 2024 14:59
The introduction to Reactive Programming you've been missing
@gre
gre / easing.js
Last active May 17, 2024 03:33
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@dmvaldman
dmvaldman / FRPandPhilosophy.md
Last active February 23, 2024 16:24
Descartes, Berkeley and Functional Reactive Programming

Descartes, Berkeley and Functional Reactive Programming

By @dmvaldman

Functional Reactive Programming (FRP) is generating buzz as an alternative to Object Oriented Programming (OOP) for certain use cases. However, an internet search quickly leads a curious and optimistic reader into the rabbit-hole of monads, functors, and other technical jargon. I’ve since emerged from this dark and lonely place with the realization that these words are mere implementation details, and that the core concepts are far more universal. In fact, the groundwork was laid down many centuries before the first computer, and has more to do with interpretations of reality, than structuring programs. Allow me to explain.

There’s an old thought experiment that goes like this:

Tree

@ryansobol
ryansobol / gist:5252653
Last active November 22, 2023 11:53
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@mikhailov
mikhailov / installation.sh
Created November 23, 2010 15:18
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@Integralist
Integralist / Ruby Lambdas.md
Last active August 8, 2023 05:10
Ruby lambdas

Lambda: standard

# Creating a lambda
l = lambda { |name| "Hi #{name}!" }

# Executing the lambda
l.call("foo") # => Hi foo!
@mgechev
mgechev / binary-search-tree-cpp.cpp
Last active October 3, 2022 03:54
Simple implementation of binary search tree in C++.
#include <iostream>
#include <math.h>
using namespace std;
template <class T>
struct Node {
T value;
Node *left;
Node *right;
@rkjha
rkjha / nginx-passenger-ssl.conf
Last active March 25, 2021 15:47
Nginx/Passenger config when using SSL with a Ruby/Rails Application.
# for redirecting hhtp traffic to https version of the site
server {
listen 80;
server_name example.com;
return 301 https://$server_name$request_uri;
}
# for redirecting to non-www version of the site
server {
listen 80;
@quad
quad / Makefile
Last active August 3, 2018 03:16
Find a cycle in a linked list, for all your tech interview problem needs.
CFLAGS=-Wall -Wextra -Werror -std=c99 -O
all: cycle
./cycle
cycle: cycle.c
anonymous
anonymous / ruby.md
Created January 12, 2017 09:35

Why I don't think Ruby is great

This post was inspired by this post on why the author thinks "Ruby is still great" and this tweet stating that Shopify (and others) are successful because of Rails, not despite it.

Now, let me first give a little background. I've been a Rails programmer since late 2006. Before Rails I went through PHP, ASP and ASP.NET (like most people at the time).

Back pre-2010, Rails was a force-multiplier, and to some degree still is. It provided a completely new way to do web development, including code generation and all the necessary tooling out of the box. The deployment story was sad until Heroku came on the scene, but we suffered through it because Rails solved a real problem.

After over 10 years of dealing with Rails' problems, I'm not so enthusiastic anymore. I believe it is impossible to write a high quality application in Rails. By high quality I mean it satis