Skip to content

Instantly share code, notes, and snippets.

View fzf's full-sized avatar

Fletcher Fowler fzf

View GitHub Profile
for a in tv/*/; do (cd "$a" && for f in *; do mv $f $(basename $(pwd)).${f##*.}; done); done
class MyClass
include Scientist
def count
science('new_count') do |experiment|
experiment.context(user: user)
experiment.use { 1 }
# One Try
experiment.try { 2 }
@fzf
fzf / boards.rb
Last active February 11, 2020 18:15
VALID_BOARD = [
[1,2,3, 4,5,6, 7,8,9],
[4,5,6, 7,8,9, 1,2,3],
[7,8,9, 1,2,3, 4,5,6],
[2,3,4, 5,6,7, 8,9,1],
[5,6,7, 8,9,1, 2,3,4],
[8,9,1, 2,3,4, 5,6,7],
[3,4,5, 6,7,8, 9,1,2],
var CommentController = {
current_users: [],
create: function(req, res) {
current_users.push('yada');
}
}
module.exports = CommentController;
@fzf
fzf / konami.js
Last active December 19, 2015 13:09
$(function () {
// konami code - up up down down left right left right b a
var konami = String.fromCharCode(38, 38, 40, 40, 37, 39, 37, 39, 66, 65);
var codeBuffer = "";
$(document).keyup(function (e) {
codeBuffer += String.fromCharCode(e.which);
if (konami.substring(0, codeBuffer.length) == codeBuffer) {
if (konami.length == codeBuffer.length) {
ba();
}
events GET /events(.:format) events#index
api_v1_events GET /api/v1/events(.:format) Api::V1/events#index
GET /events(.:format) Api::V1/events#index
@fzf
fzf / routes.rb
Last active December 11, 2015 22:29
api_version(:module => "Api::V1", :path => {:value => "api/v1"}, :default => true) do
end
@fzf
fzf / rake routes
Last active December 11, 2015 22:29
api_v1_events GET /api/v1/events(.:format) Api::V1/events#index
events GET /events(.:format) Api::V1/events#index
GET /events(.:format) events#index
Relationship fault for (<NSFetchedPropertyDescription: 0x89841a0>), name users, isOptional 1, isTransient 1, entity Place, renamingIdentifier users, validation predicates (
), warnings (
), versionHashModifier (null)
userInfo {
}, fetchRequest <NSFetchRequest: 0x8984470> (entity: Place; predicate: (ANY checkins.place == $FETCH_SOURCE); sortDescriptors: ((null)); type: NSManagedObjectResultType; ) on 0x89ad880
- (NSFetchedResultsController *)fetchedResultsController {
if (_fetchedResultsController != nil)
{
return _fetchedResultsController;
}
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY checkins.place = %@", self.place];
return [User MR_fetchAllGroupedBy:nil withPredicate:predicate sortedBy:nil ascending:TRUE];
}