Skip to content

Instantly share code, notes, and snippets.

@migimunz
migimunz / gist:3eb99184fb9d3b8ac5a1
Created September 13, 2014 00:38
Solving fizzbuzz with genetic algorithms - somewhat correct!
# The best result I got so far is 72.9% , which is
# close enough for most real word uses.
Defs = {
fizz: 0,
buzz: 1,
fizzbuzz: 2,
neither: 3
}
@cpressey
cpressey / Hope_and_Remembrance.md
Created November 28, 2014 09:45
Hope and Remembrance

Hope and Remembrance

Purnima and Leszek saw a vampire getting on a bus.

Then one day, Leszek turned to Purnima and asked, "Purnima, do you think that one day we will remember that time when we remembered that time when we saw the Loch Ness monster underneath the bridge?" "Somehow, Leszek, I'm sure we will," said Purnima.

Then one day, Leszek turned to Purnima and said, "Purnima, do you remember that one time when we saw a vampire getting on a bus?" Purnima smiled. "Of course I do, Leszek."

Then one day, Leszek turned to Purnima and said, "Purnima, do you remember that one time when we wondered if we'd ever remember that time when we remembered that time when we saw the Loch Ness monster underneath the bridge?" Purnima smiled. "Of course I do, Leszek."

@makmanalp
makmanalp / comparison.md
Last active June 10, 2024 14:24
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

@chrisroos
chrisroos / README.md
Last active June 5, 2025 19:18
Example of using bundler/inline

I came across 'bundler/inline' in Bundler pull request 3440, which I'd found from Rails pull request 20429. This now has a little snippet on the What's new page of the Bundler site.

This little example demonstrates how I might use it to create a single file using minitest.

I've just noticed that this script was working for me because I already had minitest installed as a system gem. If I uninstall the gem then the script fails because it can't find minitest. The source code documents an option to install gems if they don't exist (gemfile(true) do) but that doesn't seem to work for me. I see the following error:

Fetching gem metadata from https://rubygems.org/...
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...

Using metaclass 0.0.4

@bkozora
bkozora / lambdaAMIBackups.py
Last active February 13, 2025 04:27
AWS Lambda AMI Backups
# Automated AMI Backups
#
# @author Bobby Kozora
#
# This script will search for all instances having a tag with the name "backup"
# and value "Backup" on it. As soon as we have the instances list, we loop
# through each instance
# and create an AMI of it. Also, it will look for a "Retention" tag key which
# will be used as a retention policy number in days. If there is no tag with
# that name, it will use a 7 days default value for each AMI.
@gitFurious
gitFurious / gist:cff8a09f244d7c880e8554b2f0b4efa5
Created August 15, 2016 13:35
No Man's Strings - \LANGUAGE\NMS_LOC1_ENGLISH.MBIN
SCAN_NO_TECH
No scan technology installed
SCAN_BROKEN
Scanner is critically damaged
SCAN_RECHARGE
Scanner recharging
WARP_MSG
EXP_NPC_ANOMALY_DESC_1
As I approach the electronic being, it springs to life. From its dark mask, scanning beams emerge that envelop me. There is a unnerving chittering sound and then, unbelievably, it speaks in my language.
It offers me a choice. It can show me how to harness black holes, in order to embark upon a journey to the centre of the galaxy. It can light my way to an Atlas Interface, so I may follow a path. Or it will assist me in my own exploration.
EXP_NPC_ANOMALY_LANG_1
Rare linguistic form. Pleasure! Nada, divergent Korvax. Assistance offered. Route to galactic core? Reconnect with Atlas for guidance? Resources for journey? Yes/no?
EXP_NPC_ANOMALY_DESC_2

Follow the dirty money

A shady Internet business has been discovered.

The website has been made public by a whistle blower. We have enough evidence about the dirty deals they did. But to charge them we need to get hands on precise numbers about the transactions that happened on their platform.

Unfortunately no record of the transactions could be seized so far. The only hint we have is this one transaction:

@Azgaar
Azgaar / .block
Last active December 18, 2024 09:23
Fantasy Map Generator
license: gpl-3.0
height: 570
border: no
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active January 30, 2026 16:51
Hyperlinks in Terminal Emulators