Skip to content

Instantly share code, notes, and snippets.

View solon's full-sized avatar
🐝

Brian Solon solon

🐝
View GitHub Profile
@bergie
bergie / README.md
Created May 18, 2011 11:33
Falsy Values tutorials
@aslakhellesoy
aslakhellesoy / edit_request.feature
Created October 5, 2011 17:49 — forked from patrick99e99/edit_request.feature
Refactored from imperative to declarative
Feature: Updating an existing request
In order to change my mind about what I need
I want to be able to edit my Request
Background: Logged in via facebook with one request
Given I am logged in with facebook
And I have a request for "Dragon's Lair Arcade Game" at $2000
Scenario: Logged in users can edit requests
When I change the request to "iPhone6" at $300
@rvagg
rvagg / README.md
Last active July 19, 2024 07:32
Kindleberry "Paperwhite" Pi

Work in progress, I'll write this up properly when I'm done.

Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.

Prerequisites:

  • Raspberry Pi
  • Kindle Paperwhite freed from its locked down state (jailbroken) http://www.mobileread.com/forums/showthread.php?t=198446
    • You have to downgrade your Kindle to 5.3.1 to install the current jailbreak; that's just a matter of getting the old version image, putting it on your Kindle via USB and telling it to install "upgrade". Then you put in the Jailbreak files, load the ebook and break.
  • Your kindle will be quick to detect an upgrade is available so it'll want to upgrade soon afterwards but the jailbreak will last but you have to reinstall the developer certificates so it's a bit of a pain but doable. Find all the instructions on the mobileread.com forums and wiki.
@wrburgess
wrburgess / gist:5528649
Last active November 24, 2022 15:29
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production

@jonah-williams
jonah-williams / circle.yml
Last active May 29, 2019 14:53
Automating deployments to Heroku from CircleCI
test:
override:
- bundle exec rspec spec
deployment:
acceptance:
branch: master
commands:
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>:
timeout: 300
@gnippy
gnippy / gist:7568243
Created November 20, 2013 18:18
Tweet (Original format)
{
"created_at": "Wed Nov 20 18:13:12 +0000 2013",
"id": 4.0322452267901e+17,
"id_str": "403224522679009280",
"text": "Enjoyed our half price chicken and wawfuls today! @tamusportclubs @SullysGrill @TAMUWaterski #SCPartnerday http:\/\/t.co\/XRsVqYy9Zo",
"source": "<a href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\">Twitter for Android<\/a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
# For SCSS-Lint v0.31.0
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BorderZero:
@BorisKourt
BorisKourt / README.md
Last active August 29, 2015 14:23
Introduction to Clojure for Artists
@mnylen
mnylen / _.md
Last active April 23, 2021 21:17
Debounced fetching to reduce number of requests when doing API proxying through GraphQL

Simple implementation of debounced fetching in GraphQL to allow merging of multiple rest / database requests into one. Although this example uses GraphQL, the debouncedFetch / fetchProgramPlaycount implementations could probably be used in any context to achieve the same result.

This approach was first described by @leebyron at graphql/graphql-js#19 (comment)

For example this allows turning ten requests for playcounts from this GraphQL query into just one:

{
  latestPrograms(first: 10) {
    name,

playcount

@rrag
rrag / README.md
Last active March 19, 2024 16:11
Yet another tutorial and Cheat sheet to Functional programming

There are many tutorials and articles available online which explain functional programming. Examples show small functions, which are composed into others which again get composed. It is hard to imagine how it would all work, then come the analogies and then the math. While the math is necessary to understand it can be difficult to grasp initially. The analogies on the other hand, (at least for me) are not relatable. Some articles assume the reader knows the different terminologies of FP. Over all I felt it is not inviting to learn.

This introduction is for those who have had a tough time understanding those analogies, taken the plunge to functional programming but still have not been able to swim. This is yet another tutorial on functional programming

Terminology

Functions as first class citizens

Functions are first class means they are just like anyone else, or rather they are not special, they behave the same as say primitives or strings or objects.