This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
votes CF | |
"back in black" => { 201005211200 => '1', 201005201159 => '1', 201005201157 => '1', 201005011900 => '1', 201004190600 => '1' }, | |
"black album" => { 201005021800 => '1', 201005010600 => '1' }, | |
"black star" => { 201005011000 => '1' } | |
cached_counts CF | |
"back in black" => { 'cached_count' => 2, 'counted_until' => 201005011931 }, | |
"black album" => { 'cached_count' => 1, 'counted_until' => 201005010600 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file is licensed to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance with the | |
* License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mypackage.benchmark | |
import com.mypackage.util.Logging | |
import net.lag.configgy.Configgy | |
import scala.collection.mutable | |
import scala.collection.JavaConversions._ | |
import java.net.InetSocketAddress | |
import java.nio.charset.Charset | |
import java.util.concurrent._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'json' | |
require 'redis' | |
class RedisComments | |
def initialize(redis,namespace,sort_proc=nil) | |
@r = redis | |
@namespace = namespace | |
@sort_proc = sort_proc | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import riak | |
log = logging.getLogger(__name__) | |
class RiakCounter(object): | |
def __init__(self, bucket, key): | |
self.bucket = bucket | |
self.bucket.set_allow_multiples(True) | |
self.key = key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def migrations (sorted-map | |
;; Migrations are numbered by integer values to explicitly document them | |
1 { | |
:doc "Foo Table" | |
:up (fn [] | |
(create-table | |
:Foo | |
[:id :int "PRIMARY KEY" "NOT NULL GENERATED ALWAYS AS IDENTITY"] | |
; store a JSON blob in here for the screening record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.net.StandardSocketOptions; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.CancelledKeyException; | |
import java.nio.channels.ReadableByteChannel; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stripe CTF - Work Notes | |
mpetrov (petrov.michael@gmail.com) | |
These notes are very rough. They should give a general idea of how each level was solved. | |
---- LEVEL 01 (login: e9gx26YEb2) ----- | |
Solution: modifying PATH env variable | |
Password: kxlVXUvzv | |
date.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Michael Petrov on 12-02-23. | |
// Copyright (c) 2012 TenthBit Inc. All rights reserved. | |
// http://michaelpetrov.com (petrov.michael@gmail.com) | |
// | |
// | |
// This solution performs a timing attack on the fork system call. By monitoring the process closely | |
// it is possible to discover where the fork likely happened. With some basic heuristics, it's possible | |
// to infer where the wrong character is. With very minor brute force searching it becomes very easy | |
// to find the password one letter at a time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# giftube – Generates an animated gif from a YouTube url. | |
# | |
# Usage: | |
# | |
# giftube [youtube url] [minute:second] [duration] | |
# | |
# ex. | |
# |