This file contains hidden or 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
| diff --git a/platform/linux/surface.rs b/platform/linux/surface.rs | |
| index e2249d7..13b56ce 100644 | |
| --- a/platform/linux/surface.rs | |
| +++ b/platform/linux/surface.rs | |
| @@ -13,9 +13,9 @@ use platform::surface::NativeSurfaceMethods; | |
| use texturegl::Texture; | |
| use geom::size::Size2D; | |
| -use opengles::glx::{GLXFBConfig, GLXDrawable, GLXPixmap, GLX_BIND_TO_TEXTURE_RGBA_EXT}; | |
| +use opengles::glx::{GLXFBConfig, GLXDrawable, GLXPixmap, GLX_BIND_TO_TEXTURE_RGB_EXT}; |
This file contains hidden or 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
| Program received signal SIGSEGV, Segmentation fault. | |
| 0x00007ffff574748a in glReadPixels () from /usr/lib/x86_64-linux-gnu/libGL.so.1 | |
| (gdb) x/10xi glReadPixels | |
| 0x7ffff5747480 <glReadPixels>: add %cl,-0x75(%rax) | |
| 0x7ffff5747483 <glReadPixels+3>: add $0x25,%al | |
| 0x7ffff5747485 <glReadPixels+5>: pushq $0xffffffffffffffff | |
| => 0x7ffff574748a <glReadPixels+10>: movabs 0xcccccccc00000688,%al | |
| 0x7ffff5747493 <glReadPixels+19>: int3 | |
| 0x7ffff5747494 <glReadPixels+20>: int3 | |
| 0x7ffff5747495 <glReadPixels+21>: int3 |
This file contains hidden or 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
| macro_rules! perm ( | |
| (N) => (0); (X) => (1); (W) => (2); (WX) => (3); | |
| (R) => (4); (RX) => (5); (RW) => (6); (RWX) => (7); | |
| ) | |
| macro_rules! chmod ( | |
| ($path:expr, $u:ident, $g:ident, $o:ident) => ( | |
| println!("chmod({:s}, {:d})", | |
| $path, (perm!($u) << 6) | (perm!($g) << 3) | (perm!($o))) | |
| ) |
This file contains hidden or 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
| #include <time.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/mman.h> | |
| #include <netinet/in.h> | |
| #include <sys/select.h> |
This file contains hidden or 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 foo(func=None, x=3): | |
| def wrap(oldfunc): | |
| def newfunc(*args, **kwargs): | |
| print 'calling function, x =', x | |
| oldfunc(*args, **kwargs) | |
| return newfunc | |
| if func is None: | |
| # Decorator was used as @foo(x=...) | |
| return wrap |
This file contains hidden or 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
| $ strings $(which xview) | grep -i sorry | |
| %s: %d: Buffer overflow (token too long, sorry). | |
| %s: I can read this image type but cannot write it (sorry). | |
| jpegDump: sorry, arithmetic coding not supported | |
| jpegDump: sorry, multiple-scan support was not compiled | |
| Memory has been exhausted; operation cannot continue (sorry). | |
| information about the error is available, sorry. | |
| %s is no longer supported (sorry) | |
| Cannot create background (not enough resources, sorry) | |
| Loading image onto root would change default colormap (sorry) |
This file contains hidden or 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
| #include <stdio.h> | |
| asm("foo:"); | |
| void bar() { puts("Hello, world!"); } | |
| int main() { | |
| void foo(); | |
| foo(); | |
| return 0; | |
| } |
This file contains hidden or 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 python | |
| import os | |
| import time | |
| import traceback | |
| def get(var): | |
| with open('/sys/class/power_supply/BAT0/' + var, 'r') as f: | |
| return float(f.read().strip()) | |
| def check(): |
This file contains hidden or 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
| // rustc 0.9 (d3b3c66 2014-01-12 19:44:26 -0700) | |
| // host: x86_64-unknown-linux-gnu | |
| trait T {} | |
| struct S; | |
| impl T for S {} | |
| fn main() { |
This file contains hidden or 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
| enum Void {} | |
| impl Void { | |
| fn unreachable(self) -> ! { | |
| match self { } | |
| } | |
| unsafe fn make() -> Void { | |
| std::unstable::intrinsics::uninit() | |
| } |