Skip to content

Instantly share code, notes, and snippets.

View delexi's full-sized avatar

Alexander Baier delexi

View GitHub Profile
@delexi
delexi / gist:2982712
Created June 24, 2012 10:10
paintComponents ueberschreiben
import java.awt.Graphics;
import javax.swing.JPanel;
public class PreviewPanel extends JPanel {
private static final long serialVersionUID = 4260296905097014225L;
private int tileSize;
public PreviewPanel(int tileSize) {
@delexi
delexi / gist:2955109
Created June 19, 2012 16:27
eclim installer error
java.lang.RuntimeException: error: An error occurred while collecting items to be installed
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclim,1.7.2
No repository found containing: osgi.bundle,org.eclim.ant,1.7.2
No repository found containing: osgi.bundle,org.eclim.core,1.7.2
No repository found containing: osgi.bundle,org.eclim.jdt,1.7.2
No repository found containing: osgi.bundle,org.eclim.maven,1.7.2
No repository found containing: osgi.bundle,org.eclim.vimplugin,1.7.2
Application failed, log file location: /home/delexi/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/1340129800814.log
out: Installing org.eclim.installer.feature.group 1.7.2.
@delexi
delexi / gist:2939051
Created June 15, 2012 22:40
pacman -Syu output
[... the normal pacman pre-upgrade output ...]
error: failed to commit transaction (conflicting files)
glibc: /usr/bin/tzselect extists in filesystem
glibc: /usr/bin/zdump extists in filesystem
glibc: /usr/bin/zic exists in filesystem
Errors occurred, no packages were upgraded.
@delexi
delexi / gist:2936401
Created June 15, 2012 13:08
lsmod | grep usb output
lsmod | grep usb
usblp 9406 0
usb_storage 35386 0
btusb 10047 0
bluetooth 150114 1 btusb
scsi_mod 112765 5 libata,sd_mod,uas,usb_storage,ses
usbcore 122909 7 ehci_hcd,uhci_hcd,uas,usb_storage,btusb,usblp
usb_common 622 1 usbcore
@delexi
delexi / gist:2936314
Created June 15, 2012 12:47
dmesg output USB Stick
[125541.557585] usb 1-5: new high-speed USB device number 20 using ehci_hcd
[125541.631107] hub 1-0:1.0: unable to enumerate USB device on port 5
[125545.997575] usb 1-5: new high-speed USB device number 21 using ehci_hcd
[125546.749843] scsi16 : usb-storage 1-5:1.0
[125547.751780] scsi 16:0:0:0: Direct-Access Generic USB Flash Disk 7.76 PQ: 0 ANSI: 2
[125547.757911] sd 16:0:0:0: [sdb] Attached SCSI removable disk
@delexi
delexi / gist:2865778
Created June 4, 2012 01:24
Keyevents
FocusOut event, serial 32, synthetic NO, window 0x1200001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 32, synthetic NO, window 0x1200001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 16 0 0 0 0 0 3 4 0 0 8 80 0
import info.clearthought.layout.{ TableLayout, TableLayoutConstants, TableLayoutConstraints }
import scala.swing.{ Button, Component, LayoutContainer, MainFrame, Panel, SimpleSwingApplication }
object TablePanel {
sealed class CellJustification(val value: Int)
case object Left extends CellJustification(TableLayoutConstants.LEFT)
case object Top extends CellJustification(TableLayoutConstants.TOP)
case object Center extends CellJustification(TableLayoutConstants.CENTER)
case object Full extends CellJustification(TableLayoutConstants.FULL)
case object Bottom extends CellJustification(TableLayoutConstants.BOTTOM)
sealed trait Enum { def value: Int }
case class Element1 extends Enum { def value = 1 }
case class Element2 extends Enum { def value = 2 }
case class Element3 extends Enum { def value = 3 }
sealed trait Enum
case class Element1 extends Enum
case class Element2 extends Enum
...
case class ElementN extends Enum
object Justification extends Enumeration {
val Left = Value(TableLayoutConstants.LEFT)
val Top = Value(TableLayoutConstants.TOP)
val Center = Value(TableLayoutConstants.CENTER)
val Full = Value(TableLayoutConstants.FULL)
val Bottom = Value(TableLayoutConstants.BOTTOM)
val Right = Value(TableLayoutConstants.RIGHT)
}