Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@vamega
vamega / gist:2927e1811aa0d0ad47364fc87d6d62e6
Created July 6, 2018 22:46
Docker file for packaging things with fpm
FROM debian:stretch-slim
MAINTAINER Varun Madiath <vamega@gmail.com>
RUN apt-get update && \
apt-get -y install \
apt-transport-https \
curl \
gnupg2 \
rubygems-integration \
ruby-dev \
ruby \
#jinja2: trim_blocks: "true", lstrip_blocks: "false"
# Example configuration for snapraid
# Defines the file to use as parity storage
# It must NOT be in a data disk
# Format: "parity FILE_PATH"
{% for disk in disks.parity %}
{% if loop.index1 != 1 %}{{loop.index1}}-{% endif %}parity {{ disk.mount_point }}/snapraid.parity
{% endfor %}
@vamega
vamega / code.hs
Created February 15, 2016 08:20
Aeson issue.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Data.Aeson
import Data.Aeson.Types (Parser, Array)
import Data.Time (defaultTimeLocale, formatTime, getZonedTime)
import qualified Data.ByteString.Lazy as BL
import qualified Data.Vector as V
[2015-01-19 13:24:04] [mainwindow.py] INFO: Cnchi installer version 0.6.35
[2015-01-19 13:24:06] [timezone.py] INFO: We have connection. Let's get our timezone
[2015-01-19 13:24:07] [timezone.py] INFO: Timezone detected.
[2015-01-19 13:24:09] [check.py] INFO: We have Internet connection.
[2015-01-19 13:24:09] [check.py] INFO: We're connected to a power source.
[2015-01-19 13:24:09] [check.py] INFO: We have enough disk space.
[2015-01-19 13:24:09] [connectionpool.py] INFO: Starting new HTTP connection (1): www.archlinux.org
[2015-01-19 13:24:10] [connectionpool.py] DEBUG: "GET /mirrors/status/json/ HTTP/1.1" 301 366
[2015-01-19 13:24:10] [connectionpool.py] INFO: Starting new HTTPS connection (1): www.archlinux.org
[2015-01-19 13:24:10] [connectionpool.py] DEBUG: "GET /mirrors/status/json/ HTTP/1.1" 200 17482

Keybase proof

I hereby claim:

  • I am vamega on github.
  • I am madiathv (https://keybase.io/madiathv) on keybase.
  • I have a public key ASBaxefIA9S66WMar4FI_8DUorkwX-FmlUvyHKyzjvNDWwo

To claim this, I am signing this object:

@vamega
vamega / gist:2942686
Created June 16, 2012 22:31
Building subversion 1.6.18 on F17
Any ideas can go here.