Skip to content

Instantly share code, notes, and snippets.

View rocketraman's full-sized avatar

Raman Gupta rocketraman

View GitHub Profile
@rocketraman
rocketraman / gist:9586599
Created March 16, 2014 17:14
Xorg.0.log (diff)
--- /dev/fd/63 2014-03-16 13:14:14.831590777 -0400
+++ /dev/fd/62 2014-03-16 13:14:14.831590777 -0400
@@ -13,7 +13,7 @@
Markers: (--) probed, (**) from config file, (==) default setting,
ommand line, (!!) notice, (II) informational,
g, (EE) error, (NI) not implemented, (??) unknown.
- (==) Log file: "/var/log/Xorg.0.log", Time: Sun Mar 16 12:41:44 2014
+ (==) Log file: "/var/log/Xorg.0.log", Time: Sun Mar 16 12:44:27 2014
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
@rocketraman
rocketraman / gist:9586629
Created March 16, 2014 17:17
Xorg.0.log corrupted display
[ 33.270]
X.Org X Server 1.14.4
Release Date: 2013-10-31
[ 33.270] X Protocol Version 11, Revision 0
[ 33.270] Build Operating System: 3.12.8-300.fc20.x86_64
[ 33.270] Current Operating System: Linux edison 3.13.6-200.fc20.x86_64 #1 SMP Fri Mar 7 17:02:28 UTC 2014 x86_64
[ 33.270] Kernel command line: BOOT_IMAGE=/vmlinuz-3.13.6-200.fc20.x86_64 root=/dev/mapper/vg_ssd-lv_root ro root=/dev/mapper/vg_ssd-lv_root ro quiet rhgb SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us
[ 33.270] Build Date: 28 February 2014 03:35:50AM
[ 33.270] Build ID: xorg-x11-server 1.14.4-7.fc20
[ 33.270] Current version of pixman: 0.30.0
@rocketraman
rocketraman / gist:9586639
Created March 16, 2014 17:18
Xorg.0.log second start (good)
[ 196.211]
X.Org X Server 1.14.4
Release Date: 2013-10-31
[ 196.211] X Protocol Version 11, Revision 0
[ 196.211] Build Operating System: 3.12.8-300.fc20.x86_64
[ 196.211] Current Operating System: Linux edison 3.13.6-200.fc20.x86_64 #1 SMP Fri Mar 7 17:02:28 UTC 2014 x86_64
[ 196.211] Kernel command line: BOOT_IMAGE=/vmlinuz-3.13.6-200.fc20.x86_64 root=/dev/mapper/vg_ssd-lv_root ro root=/dev/mapper/vg_ssd-lv_root ro quiet rhgb SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us
[ 196.211] Build Date: 28 February 2014 03:35:50AM
[ 196.211] Build ID: xorg-x11-server 1.14.4-7.fc20
[ 196.211] Current version of pixman: 0.30.0
@rocketraman
rocketraman / gist:9905217
Created April 1, 2014 00:18
Git-based (contrib) prompt
GRN="\[\e[32m\]"
YLW="\[\e[33m\]"
BLU="\[\e[34m\]"
PNK="\[\e[35m\]"
NOc="\[\033[0m\]"
source /usr/share/git-core/contrib/completion/git-prompt.sh
PROMPT_COMMAND='__git_ps1 "$GRN\u@\h $YLW\w$NOc" " $YLW\\\$$NOc "'
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWCOLORHINTS=1
@rocketraman
rocketraman / TestCacheOpen.scala
Last active August 29, 2015 14:01
Spray caching test with no compression
import akka.actor.ActorSystem
import java.io.FileWriter
import scala.Some
import scala.util.{Failure, Success}
import spray.http.HttpEncodings._
import spray.http.HttpHeaders.`Accept-Encoding`
import spray.http.HttpMethods.GET
import spray.http._
import spray.httpx.encoding.{Gzip, Deflate, NoEncoding}
import spray.routing.RequestContext
package mypackage.web
import akka.actor._
import akka.io.IO
import akka.pattern.{AskTimeoutException, ask, gracefulStop, pipe}
import com.typesafe.scalalogging.slf4j.Logger
import javax.inject.Inject
import org.slf4j.LoggerFactory
import scala.concurrent.duration._
import scala.concurrent.{Await, Future}
@rocketraman
rocketraman / BackupPC_deleteFile.pl
Last active November 8, 2017 22:05
BackupPC_deleteFile.pl
#!/usr/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_deleteFile.pl: Delete one or more files/directories from
# a range of hosts, backups, and shares
#
# DESCRIPTION
# See below for detailed description of what it does and how it works
#
# AUTHOR
@rocketraman
rocketraman / equals-hash-tostring.java
Last active April 29, 2020 01:48 — forked from rocketraman/equals-hash-tostring.java
Example of JDK7+ Objects equals, hash and Guava 18+ toString implementations
import com.google.common.base.MoreObjects;
import java.util.Objects;
public class Address {
...
@Override
public boolean equals(Object obj) {
@rocketraman
rocketraman / pom.xml
Last active May 24, 2024 07:05
Karaf-maven-plugin example
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- ... -->
<packaging>karaf-assembly</packaging>
<build>
<plugins>
<plugin>
#%RAML 1.0
title: Test
version: v1
baseUri: http://localhost:8080
types:
GeoPoint:
properties:
coordinates:
type: number[]
example: