Skip to content

Instantly share code, notes, and snippets.

// My first C# program - "Moon Lander"
using System;
using System.IO; // StreamReader
namespace lander
{
class Program
{
static void Main(string[] args)
commit dd727d8c69f60c86a68f5c48f98f196be0bdf4ac
Author: Tim Burke <tim.burke@gmail.com>
Date: Fri Sep 15 06:15:40 2017 +0000
Differentiate between a drive that's not mounted vs. not a dir more
Change-Id: Ife0d34f9482adb4524d1ab1fe6c335c6b287c2fd
diff --git a/swift/account/reaper.py b/swift/account/reaper.py
index 0fe8adba2..dc7cc63ad 100644
commit 5b4e5617096d984e2633f4697002a9592f564d12
Author: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Wed Jun 14 22:28:13 2017 -0600
Buffer reads from disk (alt 1)
Otherwise, Python defaults to 8k reads which seems kinda terrible.
As a side-effect, get more picky about the types of input we wrap. While
you can still send unicode that can be encoded to ASCII, any other
diff --git a/swiftclient/utils.py b/swiftclient/utils.py
index 08cd7b2..3288fcd 100644
--- a/swiftclient/utils.py
+++ b/swiftclient/utils.py
@@ -297,6 +297,10 @@ class LengthWrapper(object):
if self._remaining <= 0:
return ''
+ # Thank Martin v. Loewis for this.
+ if size == 8192:
commit 065a697f5537454123479a8929e0c6d8492d5c8d
Author: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Wed Jan 18 23:27:40 2017 -0700
Embrio of new POST /a/c/object
diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py
index d6aec48..bf25d90 100644
--- a/swift/obj/diskfile.py
+++ b/swift/obj/diskfile.py
@zaitcev
zaitcev / swift-c347498-x1.diff
Created July 27, 2016 16:31
Alternative for c/347498
See https://review.openstack.org/347498
monkey_patch_mimetools() now does nothing on py3
diff --git a/swift/common/wsgi.py b/swift/common/wsgi.py
index 88e61f2..f018cd1 100644
--- a/swift/common/wsgi.py
+++ b/swift/common/wsgi.py
@@ -22,7 +22,6 @@ import inspect
import os
import signal
@zaitcev
zaitcev / ceph-p7408-2.diff
Created January 30, 2016 03:48
Counter-proposal for pull/7408
commit 2213f9db9f87ee75203980784d8ea43d882cf2e2
Author: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Fri Jan 29 20:43:43 2016 -0700
Counter-fix for pull/7408
diff --git a/src/rgw/rgw_rest_metadata.h b/src/rgw/rgw_rest_metadata.h
index 7f3cf1f..e68f9d3 100644
--- a/src/rgw/rgw_rest_metadata.h
+++ b/src/rgw/rgw_rest_metadata.h
@zaitcev
zaitcev / rgw.trace.txt
Created June 27, 2015 00:22
rgw.trace.txt 2
v2
## Down the rabbit hole
- check out Yehuda's branch
- "swift and s3 have separate url-to-object translations" - ?
class rgw_obj # rgw_common.h
std::string loc;
class RGWGetObj : public RGWOp # rgw_op.h
rgw_obj obj;
map<string, bufferlist> attrs;
@zaitcev
zaitcev / rgw.trace.txt
Created June 24, 2015 05:27
rgw.trace.txt 1
v1
## Down the rabbit hole
- check out Yehuda's branch
- "swift and s3 have separate url-to-object translations" - ?
class rgw_obj # rgw_common.h
std::string loc;
class RGWGetObj : public RGWOp # rgw_op.h
rgw_obj obj;
map<string, bufferlist> attrs;
@zaitcev
zaitcev / swift-be-calls.txt
Created March 22, 2014 01:01
Semantic diff for PBE from the standpoint of Broker/Backend API in the servers
Semanic diff for https://review.openstack.org/47713
Use 142 columns
Use '*' in vi to highlight broker
## Account (HEAD) ## Account (PBE)
class AccountController(object): class AccountController(object):
def HEAD(self, req): def HEAD(self, req):
broker = self._get_account_broker(drive, part, account, ...) broker = self.get_account_backend(drive, part, account,...)