Skip to content

Instantly share code, notes, and snippets.

Welcome to Scala version 2.11.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_71).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :paste
// Entering paste mode (ctrl-D to finish)
object A { sealed trait B ; case object C extends B }
import A._
class A(val b: B)
@PkmX
PkmX / gist:fefff90bab3b6eb2847f
Last active January 13, 2017 06:41
Nexus 5 Camera Characteristics Dump
Camera module HAL API version: 0x100
Camera module API version: 0x203
Camera module name: QCamera Module
Camera module author: Qualcomm Innovation Center Inc
Number of camera devices: 2
Vendor tag definitions:
Dumping configured vendor tag descriptors: 3 entries
0x80000000 (privatedata_reprocess) with type 0 (byte) defined in section org.codeaurora.qcamera3.privatedata
0x80010000 (opaque_raw_strides) with type 1 (int32) defined in section org.codeaurora.qcamera3.opaque_raw
@PkmX
PkmX / Makefile
Created November 8, 2014 06:09
Parallel Programming Homework 1 - Monte Carlo π estimation with pthread
CC := gcc
CFLAGS := -std=gnu99 -Wall -pedantic -pthread -Ofast -march=native -funroll-loops -ftree-vectorize
BIN := pi
SRCS := pi.c
ZIP := HW1_0356162.zip
.PHONY: all clean zip
all: $(BIN)
3170: 0cd0 lsrs r0, r2, #19 | 3170: 0334 lsls r4, r6, #12
3172: 09a0 lsrs r0, r4, #6 | 3172: 026a lsls r2, r5, #9
3174: 0d70 lsrs r0, r6, #21 3174: 0d70 lsrs r0, r6, #21
3176: 09c8 lsrs r0, r1, #7 | 3176: 0272 lsls r2, r6, #9
3178: 4900 ldr r1, [pc, #0] ; (31 3178: 4900 ldr r1, [pc, #0] ; (31
317a: 0f7f lsrs r7, r7, #29 317a: 0f7f lsrs r7, r7, #29
317c: 4900 ldr r1, [pc, #0] ; (31 | 317c: d240 bcs.n 3200 <imx179_open_lib
317e: 0f7f lsrs r7, r7, #29 | 317e: 03df lsls r7, r3, #15
3180: 0001 movs r1, r0 3180: 0001 movs r1, r0
3182: 0000 movs r0, r0 3182: 0000 movs r0, r0
pkmx@singularity ~ $ bash -c 'while true; do sleep 123; done;' &
[1] 9885
pkmx@singularity ~ $ sudo gcore 9885
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Got object file from memory but can't read symbols: File truncated.
0x00007ffc86e5a39a in waitpid () from /usr/lib/libc.so.6
warning: target file /proc/9885/cmdline contained unexpected null characters
warning: Memory read failed for corefile section, 8192 bytes at 0x7fff9243c000.
Saved corefile core.9885
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Control.Applicative
import Control.Monad.ST
import Data.Bool
import qualified Data.Foldable as F
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector.Algorithms.Radix as VA
@PkmX
PkmX / Main.hs
Last active August 29, 2015 14:02
module Main (main) where
import Control.Applicative
import qualified Data.Foldable as F
import Data.Hashable (Hashable)
import qualified Data.HashSet as HS
import Linear (V3(..))
import System.Environment (getArgs)
type Forest = V3 Int
{-# LANGUAGE GADTs #-}
module Main (main) where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad
data Case r where
@PkmX
PkmX / PKGBUILD
Last active August 29, 2015 13:57
Doomseeker
# Maintainer: Robert La Spina <rkidlaspina [at] gmail [dot] com>
# Contributor: MP2E <MP2E {AT] archlinux.us>
# Contributor: PkmX <[email protected]>
#
# TODO: Find a way to put engine plugins in /usr/lib/$pkgname.
pkgname=doomseeker
pkgver=0.11.1b
pkgrel=1
pkgdesc='A cross-platform server browser for various multiplayer Doom source-ports.'