Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gchp on github.
  • I am gchp (https://keybase.io/gchp) on keybase.
  • I have a public key whose fingerprint is CA35 7CF8 BAEB AA61 5015 1B63 B6FB 26EA 65E7 121F

To claim this, I am signing this object:

diff --git a/metacity-1/metacity-theme-3.xml b/metacity-1/metacity-theme-3.xml
index 0e285a9..52d8c54 100644
--- a/metacity-1/metacity-theme-3.xml
+++ b/metacity-1/metacity-theme-3.xml
@@ -46,17 +46,14 @@
<distance name="right_titlebar_edge" value="1"/>
</frame_geometry>
-<frame_geometry name="max" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false">
+<frame_geometry name="max" has_title="false" parent="normal" rounded_top_left="false" rounded_top_right="false">
@gchp
gchp / main.rs
Last active August 29, 2015 14:10
Share struct fields across threads
use std::sync::Arc;
struct Editor {
running: Arc<bool>,
}
impl Editor {
fn start(&mut self) {
*self.running = true;
let running = self.running.clone();
@gchp
gchp / edit.rs
Created November 14, 2014 13:50
Does not live long enough
use std::cell::RefCell;
use std::io::{BufferedReader, File};
struct Buffer<'b> {
lines: Vec<RefCell<Line>>,
cursor: Cursor<'b>,
}
impl<'b> Buffer<'b> {
@gchp
gchp / main.rs
Last active August 29, 2015 14:09
Dereference error
type Link = Option<Box<Line>>;
struct Cursor {
line: Link,
}
struct Line {
next: Link,
value: String,
}
struct Line {
next: Option<&Line>, // error: missing lifetime specifier [E0106]
prev: Option<&Line>, // error: missing lifetime specifier [E0106]
data: Option<String>,
}
fn main() {
let l = Line { next: None, prev: None, data: "test".to_string() };
println!("{}", l.data);
from optparse import make_option
from django.test.simple import DjangoTestSuiteRunner
def fake_create_test_db(self, verbosity=1, autoclobber=False):
"""Simplified version of BaseDatabaseCreation.create_test_db."""
test_database_name = self._get_test_db_name()
if verbosity >= 1: